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; }
Required Methods
fn get_encoding(&self) -> ContentEncoding
Gets the encoding type of the stream wrapped by self
.
Returns
the encoding type of the internal stream.
fn get_stream(&self) -> Option<Stream>
fn set_encoding(&self, encoding: ContentEncoding)
fn set_stream<P: IsA<Stream>>(&self, stream: &P)
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
fn write_to_stream<P: IsA<Stream>>(&self, stream: &P) -> isize
Implementors
impl<O: IsA<DataWrapper>> DataWrapperExt for O