pub trait HeaderValue:
Send
+ Sync
+ 'static {
// Required methods
fn header_name(&self) -> &'static str;
fn to_bytes(&self) -> Option<Vec<u8>>;
fn as_any(&self) -> &dyn Any;
}Expand description
A header value that can be stored in the Headers map. Locally: stored by TypeId for type-safe access. Remotely: serialized via to_bytes() with header_name() as key.
Required Methods§
Sourcefn header_name(&self) -> &'static str
fn header_name(&self) -> &'static str
Stable, unique name for wire transport.