Trait HeaderObjTrait

Source
pub trait HeaderObjTrait:
    Sync
    + Send
    + Any
    + Debug {
    // Required methods
    fn name(&self) -> HeaderName;
    fn is_max_one(&self) -> bool;
    fn validator(&self) -> Option<HeaderMapValidator>;
    fn encode(
        &self,
        encoder: &mut EncodingWriter<'_>,
    ) -> Result<(), EncodingError>;
    fn boxed_clone(&self) -> Box<HeaderObj>;
}

Required Methods§

Implementations§

Source§

impl dyn HeaderObjTrait

Source

pub fn is<H>(&self) -> bool
where H: HeaderKind,

Source

pub fn downcast_ref<H>(&self) -> Option<&Header<H>>
where H: HeaderKind,

Source

pub fn downcast_mut<H>(&mut self) -> Option<&mut Header<H>>
where H: HeaderKind,

Trait Implementations§

Implementors§

Source§

impl<H> HeaderObjTrait for Header<H>
where H: HeaderKind,