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§
fn encode(&self, encoder: &mut EncodingWriter<'_>) -> Result<(), EncodingError>
fn boxed_clone(&self) -> Box<dyn EncodableInHeader>
Implementations§
Source§impl dyn EncodableInHeader
impl dyn EncodableInHeader
pub fn is<T>(&self) -> boolwhere
T: EncodableInHeader,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: EncodableInHeader,
pub fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: EncodableInHeader,
Trait Implementations§
Source§impl Clone for Box<dyn EncodableInHeader>
impl Clone for Box<dyn EncodableInHeader>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more