[−][src]Struct httlib_hpack::Table
This table represents a single index address space for headers where the static and the dynamic table are combined.
Implementations
impl<'a> Table<'a>
[src]
pub fn with_dynamic_size(max_dynamic_size: u32) -> Self
[src]
Returns a new header table instance with the provided maximum allowed size of the dynamic table.
pub fn len(&self) -> usize
[src]
Returns the total number of headers. The result includes the sum of all entries of the static and the dynamic table combined.
pub fn dynamic_len(&self) -> usize
[src]
Returns the total number of entries stored in the dynamic table.
pub fn dynamic_size(&self) -> u32
[src]
Returns the total size (in octets) of all the entries stored in the dynamic table.
pub fn max_dynamic_size(&self) -> u32
[src]
Returns the maximum allowed size of the dynamic table.
pub fn update_max_dynamic_size(&mut self, size: u32)
[src]
Updates the maximum allowed size of the dynamic table.
pub fn iter(&'a self) -> TableIter<'a>ⓘ
[src]
Returns an iterator through all the headers.
It includes entries stored in the static and the dynamic table. Since
the index 0
is an invalid index, the first returned item is at index
1
. The entries returned have indices ordered sequentially in the
single address space (first the headers in the static table, followed by
headers in the dynamic table).
pub fn get(&self, index: u32) -> Option<(&[u8], &[u8])>
[src]
Finds a header by its index.
According to the HPACK specification, the index 0
must be treated as
an invalid index number. The value for index 0
in the static table is
thus missing. The index of 0
will always return None
.
pub fn find(&self, name: &[u8], value: &[u8]) -> Option<(usize, bool)>
[src]
Searches the static and the dynamic tables for the provided header. It tries to match both the header name and value to one of the headers in the table. If no such header exists, then it falls back to the one that matched only the name. The returned match contains the index of the header in the table and a boolean indicating whether the value of the header also matched.
pub fn insert(&mut self, name: Vec<u8>, value: Vec<u8>)
[src]
Inserts a new header at the beginning of the dynamic table.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Table<'a>
impl<'a> Send for Table<'a>
impl<'a> Sync for Table<'a>
impl<'a> Unpin for Table<'a>
impl<'a> UnwindSafe for Table<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,