[][src]Trait mail_internals::encoder::EncodableInHeader

pub trait EncodableInHeader: Send + Sync + Any + Debug {
    fn encode(&self, encoder: &mut EncodingWriter) -> Result<(), EncodingError>;
fn boxed_clone(&self) -> Box<dyn EncodableInHeader>; }

Trait Implemented by "components" used in header field bodies

This trait can be turned into a trait object allowing runtime genericallity over the "components" if needed.

Required methods

fn encode(&self, encoder: &mut EncodingWriter) -> Result<(), EncodingError>

fn boxed_clone(&self) -> Box<dyn EncodableInHeader>

Loading content...

Methods

impl dyn EncodableInHeader[src]

pub fn is<T: EncodableInHeader>(&self) -> bool[src]

pub fn downcast_ref<T: EncodableInHeader>(&self) -> Option<&T>[src]

pub fn downcast_mut<T: EncodableInHeader>(&mut self) -> Option<&mut T>[src]

Implementors

impl EncodableInHeader for EncodeFn[src]

impl<FN: 'static> EncodableInHeader for EncodeClosure<FN> where
    FN: Send + Sync + for<'a, 'b> Fn(&'a mut EncodingWriter<'b>) -> Result<(), EncodingError>, 
[src]

Loading content...