Trait gmime::DataWrapperExt[][src]

pub trait DataWrapperExt {
    fn get_encoding(&self) -> ContentEncoding;
fn get_stream(&self) -> Option<Stream>;
fn set_encoding(&self, encoding: ContentEncoding);
fn set_stream<P: IsA<Stream>>(&self, stream: &P);
fn write_to_stream<P: IsA<Stream>>(&self, stream: &P) -> isize; }

Trait containing all DataWrapper methods.

Implementors

DataWrapper

Required Methods

Gets the encoding type of the stream wrapped by self.

Returns

the encoding type of the internal stream.

Gets a reference to the stream wrapped by self.

Returns

a reference to the internal stream.

Sets the encoding type of the internal stream.

encoding

encoding

Replaces the wrapper's internal stream with stream. Don't forget, if stream is not of the same encoding as the old stream, you'll want to call DataWrapperExt::set_encoding as well.

Note: caller is responsible for its own reference on stream.

stream

a Stream

Writes the raw (decoded) data to the output stream.

stream

output stream

Returns

the number of bytes written or %-1 on failure.

Implementors