pub trait NamedHeader: Sized + Send {
const NAME: &'static str;
// Required method
fn decode(value: &str) -> Result<Self, String>;
// Provided method
fn schema(_registry: &mut SchemaRegistry) -> SchemaObject { ... }
}Expand description
A typed HTTP header identified by a static name.
Required Associated Constants§
Required Methods§
Provided Methods§
Sourcefn schema(_registry: &mut SchemaRegistry) -> SchemaObject
fn schema(_registry: &mut SchemaRegistry) -> SchemaObject
JSON Schema for this header (defaults to a string).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".