pub trait TypedHeader {
// Required methods
fn name() -> &'static str;
fn encode(&self, map: &mut HeaderMap);
fn decode(from: &str) -> Result<Self, Error>
where Self: Sized;
// Provided method
fn encode_to_string(&self) -> Vec<String> { ... }
}
Required Methods§
fn name() -> &'static str
fn encode(&self, map: &mut HeaderMap)
fn decode(from: &str) -> Result<Self, Error>where
Self: Sized,
Provided Methods§
fn encode_to_string(&self) -> Vec<String>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.