pub struct HpackInteger<'a> { /* private fields */ }Expand description
A validated, exact borrowed HPACK integer representation.
Implementations§
Source§impl<'a> HpackInteger<'a>
impl<'a> HpackInteger<'a>
Sourcepub fn parse(
bytes: &'a [u8],
prefix_bits: u8,
) -> Result<Self, HpackIntegerParseError>
pub fn parse( bytes: &'a [u8], prefix_bits: u8, ) -> Result<Self, HpackIntegerParseError>
Parses one RFC 7541 section 5.1 integer and excludes any following bytes.
Sourcepub const fn as_bytes(self) -> &'a [u8]
pub const fn as_bytes(self) -> &'a [u8]
Returns the exact encoded representation, excluding any following bytes.
Sourcepub const fn prefix_bits(self) -> u8
pub const fn prefix_bits(self) -> u8
Returns the number of controlled low bits in the first octet.
Trait Implementations§
Source§impl<'a> Clone for HpackInteger<'a>
impl<'a> Clone for HpackInteger<'a>
impl<'a> Copy for HpackInteger<'a>
Source§impl<'a> Debug for HpackInteger<'a>
impl<'a> Debug for HpackInteger<'a>
impl<'a> Eq for HpackInteger<'a>
Source§impl<'a> PartialEq for HpackInteger<'a>
impl<'a> PartialEq for HpackInteger<'a>
impl<'a> StructuralPartialEq for HpackInteger<'a>
Auto Trait Implementations§
impl<'a> Freeze for HpackInteger<'a>
impl<'a> RefUnwindSafe for HpackInteger<'a>
impl<'a> Send for HpackInteger<'a>
impl<'a> Sync for HpackInteger<'a>
impl<'a> Unpin for HpackInteger<'a>
impl<'a> UnsafeUnpin for HpackInteger<'a>
impl<'a> UnwindSafe for HpackInteger<'a>
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