[−][src]Struct hpack_codec::table::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]
fn from(f: StaticEntry) -> Self
[src]
impl Clone for Index
[src]
impl Copy for Index
[src]
impl Eq for Index
[src]
impl Ord for Index
[src]
fn cmp(&self, other: &Index) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Index> for Index
[src]
impl PartialOrd<Index> for Index
[src]
fn partial_cmp(&self, other: &Index) -> Option<Ordering>
[src]
fn lt(&self, other: &Index) -> bool
[src]
fn le(&self, other: &Index) -> bool
[src]
fn gt(&self, other: &Index) -> bool
[src]
fn ge(&self, other: &Index) -> bool
[src]
impl Debug for Index
[src]
impl Add<u16> for Index
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u16) -> Self::Output
[src]
impl AddAssign<u16> for Index
[src]
fn add_assign(&mut self, rhs: u16)
[src]
impl Hash for Index
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,