[][src]Function mail::header_components::word::do_encode_word

pub fn do_encode_word<'a, 'b>(
    word: &'a Word,
    handle: &'a mut EncodingWriter<'b>,
    ecw_ctx: Option<EncodedWordContext>
) -> Result<(), EncodingError> where
    'b: 'a, 

As word has to be differently encoded, depending on the context it appears in it cannot implement EncodableInHeader, instead we have a function which can be used by type containing it which (should) implement EncodableInHeader

If ecw_ctx is None the word can not be encoded as a "encoded-word", if it is Some(context) the context represents in which context the word does appear, which changes some properties of the encoded word.

NOTE: != encoded-word, through it might create an encoded-word