pub struct Table { /* private fields */ }Expand description
Combined lookup — index into static + dynamic. RFC 7541 §2.3.
Static = 1..=61, dynamic = 62..=N.
Implementations§
Source§impl Table
impl Table
Sourcepub fn add(&mut self, field: HeaderField)
pub fn add(&mut self, field: HeaderField)
Adds a new entry to the dynamic table (at the front). Spec §4.4.
Sourcepub fn get(&self, index: usize) -> Option<HeaderField>
pub fn get(&self, index: usize) -> Option<HeaderField>
Lookup by combined index.
Sourcepub fn find(&self, name: &str, value: &str) -> Option<(usize, bool)>
pub fn find(&self, name: &str, value: &str) -> Option<(usize, bool)>
Searches for a header-field match. Returns (index, full_match).
full_match=true: name + value match.
full_match=false: only the name matches.
Sourcepub fn set_max_size(&mut self, new_max: usize)
pub fn set_max_size(&mut self, new_max: usize)
Sets a new max size — on shrink, entries are evicted from the back.
Trait Implementations§
impl Eq for Table
impl StructuralPartialEq for Table
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
impl UnwindSafe for Table
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more