pub struct Table {
mask: usize,
indices: Vec<Option<Pos>>,
slots: VecDeque<Slot>,
inserted: usize,
size: usize,
max_size: usize,
}
Expand description
HPACK encoder table
Fields§
§mask: usize
§indices: Vec<Option<Pos>>
§slots: VecDeque<Slot>
§inserted: usize
§size: usize
§max_size: usize
Implementations§
source§impl Table
impl Table
pub fn new(max_size: usize, capacity: usize) -> Table
pub fn capacity(&self) -> usize
pub fn max_size(&self) -> usize
sourcepub fn resolve<'a>(&'a self, index: &'a Index) -> &'a Header
pub fn resolve<'a>(&'a self, index: &'a Index) -> &'a Header
Gets the header stored in the table
pub fn resolve_idx(&self, index: &Index) -> usize
fn index_dynamic( &mut self, header: Header, statik: Option<(usize, bool)>, ) -> Index
fn index_occupied( &mut self, header: Header, hash: HashValue, index: usize, statik: Option<usize>, ) -> Index
fn index_vacant( &mut self, header: Header, hash: HashValue, dist: usize, probe: usize, statik: Option<(usize, bool)>, ) -> Index
fn insert(&mut self, header: Header, hash: HashValue)
pub fn resize(&mut self, size: usize)
fn update_size(&mut self, len: usize, prev_idx: Option<usize>) -> bool
fn converge(&mut self, prev_idx: Option<usize>) -> bool
fn evict(&mut self, prev_idx: Option<usize>)
fn remove_phase_two(&mut self, probe: usize)
fn reserve_one(&mut self)
fn grow(&mut self, new_raw_cap: usize)
fn reinsert_entry_in_order(&mut self, pos: Option<Pos>)
fn assert_valid_state(&self, _: &'static str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin 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