Trait EncodedWordWriter

Source
pub trait EncodedWordWriter {
    // Required methods
    fn write_char(&mut self, ch: SoftAsciiChar);
    fn write_charset(&mut self);
    fn encoding(&self) -> EncodedWordEncoding;
    fn write_ecw_seperator(&mut self);
    fn max_payload_len(&self) -> usize;

    // Provided methods
    fn write_ecw_start(&mut self) { ... }
    fn write_ecw_end(&mut self) { ... }
    fn start_next_encoded_word(&mut self) { ... }
    fn write_str(&mut self, s: &SoftAsciiStr) { ... }
}

Required Methods§

Source

fn write_char(&mut self, ch: SoftAsciiChar)

Source

fn write_charset(&mut self)

Source

fn encoding(&self) -> EncodedWordEncoding

Source

fn write_ecw_seperator(&mut self)

Source

fn max_payload_len(&self) -> usize

Returns the maximal length of the paylod/encoded data

Any number of calls to methods on in trait in any way should never be able to change the returned value. Only changing e.g. the charset or encoding should be able to change what max_paylod_len returns.

Provided Methods§

Implementors§

Source§

impl<'a> EncodedWordWriter for VecWriter<'a>

Source§

impl<'a, 'b: 'a> EncodedWordWriter for WriterWrapper<'a, 'b>