pub struct DynamicTable { /* private fields */ }Expand description
The decoder’s view of the table the peer is building.
Implementations§
Source§impl DynamicTable
impl DynamicTable
pub fn new(capacity: usize) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn size(&self) -> usize
pub fn capacity(&self) -> usize
Sourcepub fn set_capacity(&mut self, capacity: usize)
pub fn set_capacity(&mut self, capacity: usize)
Apply a dynamic table size update from the peer.
Shrinking evicts immediately; the peer has already done the same, so the two tables stay in step.
Sourcepub fn get(&self, index: usize) -> Option<(&str, &str)>
pub fn get(&self, index: usize) -> Option<(&str, &str)>
Look up a 1-based HPACK index, which for the dynamic table starts at 62.
Sourcepub fn insert(&mut self, name: &str, value: &str)
pub fn insert(&mut self, name: &str, value: &str)
Insert an indexed header, evicting only as required by the peer’s byte capacity. A capacity above our fixed storage is supported only while its entries fit. Exceeding storage invalidates dynamic lookups until an explicit table clear; silently evicting would shift the peer’s indices.
Auto Trait Implementations§
impl Freeze for DynamicTable
impl RefUnwindSafe for DynamicTable
impl Send for DynamicTable
impl Sync for DynamicTable
impl Unpin for DynamicTable
impl UnsafeUnpin for DynamicTable
impl UnwindSafe for DynamicTable
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