[][src]Struct hpack_codec::table::Index

pub struct Index(_);

Entry Index.

Methods

impl Index[src]

pub fn new(index: u16) -> Result<Self>[src]

Makes a new Index instance.

The value of index must be greater than zero.

Examples

use hpack_codec::table::Index;

assert!(Index::new(1).is_ok());
assert!(Index::new(0).is_err());

pub fn dynamic_table_offset() -> Self[src]

Returns the Index instance which has the starting index of the dynamic table.

See: 2.3.3. Index Address Space

Examples

use hpack_codec::table::Index;

assert_eq!(Index::dynamic_table_offset().as_u16(), 62);
assert_eq!(Index::dynamic_table_offset() + 8, Index::new(70).unwrap());

pub fn as_u16(&self) -> u16[src]

Returns the value of this index.

Trait Implementations

impl<'a> From<Index> for RawHeaderField<'a>[src]

impl From<StaticEntry> for Index[src]

impl Clone for Index[src]

impl Copy for Index[src]

impl Eq for Index[src]

impl Ord for Index[src]

impl PartialEq<Index> for Index[src]

impl PartialOrd<Index> for Index[src]

impl Debug for Index[src]

impl Add<u16> for Index[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<u16> for Index[src]

impl Hash for Index[src]

impl StructuralPartialEq for Index[src]

impl StructuralEq for Index[src]

Auto Trait Implementations

impl Send for Index

impl Sync for Index

impl Unpin for Index

impl UnwindSafe for Index

impl RefUnwindSafe for Index

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]