Trait gmime::FilterExt [−][src]
pub trait FilterExt { fn backup(&self, data: &[u8]); fn complete(&self, inbuf: &[u8], prespace: usize) -> (Vec<u8>, usize); fn copy(&self) -> Option<Filter>; fn filter(&self, inbuf: &[u8], prespace: usize) -> (Vec<u8>, usize); fn reset(&self); fn set_size(&self, size: usize, keep: bool); }
Trait containing all Filter
methods.
Implementors
FilterBasic
, FilterBest
, FilterCharset
, FilterDos2Unix
, FilterEnriched
, FilterFrom
, FilterGZip
, FilterHTML
, FilterOpenPGP
, FilterSmtpData
, FilterStrip
, FilterUnix2Dos
, FilterWindows
, FilterYenc
, Filter
Required Methods
fn backup(&self, data: &[u8])
Sets number of bytes backed up on the input, new calls replace previous ones
data
data to backup
length
length of data
fn complete(&self, inbuf: &[u8], prespace: usize) -> (Vec<u8>, usize)
Completes the filtering.
inbuf
input buffer
inlen
input buffer length
prespace
prespace buffer length
outbuf
pointer to output buffer
outlen
pointer to output length
outprespace
pointer to output prespace buffer length
fn copy(&self) -> Option<Filter>
fn filter(&self, inbuf: &[u8], prespace: usize) -> (Vec<u8>, usize)
Filters the input data and writes it to out
.
inbuf
input buffer
inlen
input buffer length
prespace
prespace buffer length
outbuf
pointer to output buffer
outlen
pointer to output length
outprespace
pointer to output prespace buffer length
fn reset(&self)
Resets the filter.
fn set_size(&self, size: usize, keep: bool)
Implementors
impl<O: IsA<Filter>> FilterExt for O