Trait EncodableInHeader

Source
pub trait EncodableInHeader:
    Send
    + Sync
    + Any
    + Debug {
    // Required methods
    fn encode(
        &self,
        encoder: &mut EncodingWriter<'_>,
    ) -> Result<(), EncodingError>;
    fn boxed_clone(&self) -> Box<dyn EncodableInHeader>;
}
Expand description

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§

Source

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

Source

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

Implementations§

Trait Implementations§

Source§

impl Clone for Box<dyn EncodableInHeader>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl EncodableInHeaderBoxExt for Box<dyn EncodableInHeader>

Source§

impl EncodableInHeaderBoxExt for Box<dyn EncodableInHeader + Send>

Implementors§

Source§

impl EncodableInHeader for EncodeFn

Source§

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