Trait proxy_sdk::HttpHeaderControl
source · 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§
Object Safety§
This trait is not object safe.