pub trait HttpHeaderControl: HttpControl {
const HEADER_TYPE: HeaderType;
// Required method
fn header_count(&self) -> usize;
// Provided methods
fn all(&self) -> Vec<(String, Vec<u8>)> { ... }
fn get(&self, name: impl AsRef<str>) -> Option<Vec<u8>> { ... }
fn set(&self, name: impl AsRef<str>, value: impl AsRef<[u8]>) { ... }
fn set_all(&self, values: &[(&str, &[u8])]) { ... }
fn add(&self, name: impl AsRef<str>, value: impl AsRef<[u8]>) { ... }
fn remove(&self, name: impl AsRef<str>) { ... }
}
Expand description
Defines functions to interact with header data
Required Associated Constants§
Sourceconst HEADER_TYPE: HeaderType
const HEADER_TYPE: HeaderType
The header type
Required Methods§
Sourcefn header_count(&self) -> usize
fn header_count(&self) -> usize
Number of headers contained in block
Provided Methods§
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.