pub struct QpackStringLiteral<'a> { /* private fields */ }Expand description
A validated borrowed QPACK string literal whose payload remains opaque.
Implementations§
Source§impl<'a> QpackStringLiteral<'a>
impl<'a> QpackStringLiteral<'a>
Sourcepub fn parse(
bytes: &'a [u8],
prefix_bits: u8,
) -> Result<Self, QpackStringLiteralParseError>
pub fn parse( bytes: &'a [u8], prefix_bits: u8, ) -> Result<Self, QpackStringLiteralParseError>
Parses one N-bit-prefixed QPACK string literal and excludes following bytes.
Sourcepub const fn prefix_bits(self) -> u8
pub const fn prefix_bits(self) -> u8
Returns the total RFC 9204 string prefix width N, including H.
Sourcepub const fn previous_high_bits(self) -> u8
pub const fn previous_high_bits(self) -> u8
Returns the previous representation’s high bits, excluding the H flag.
Sourcepub const fn is_huffman(self) -> bool
pub const fn is_huffman(self) -> bool
Returns whether the opaque payload is RFC 7541 Huffman-coded.
Sourcepub const fn length(self) -> QpackInteger<'a>
pub const fn length(self) -> QpackInteger<'a>
Returns the exact parsed length integer, including any legal noncanonical encoding.
Sourcepub const fn encoded_payload(self) -> &'a [u8]
pub const fn encoded_payload(self) -> &'a [u8]
Returns the opaque encoded payload; this does not Huffman-decode it.
Trait Implementations§
Source§impl<'a> Clone for QpackStringLiteral<'a>
impl<'a> Clone for QpackStringLiteral<'a>
impl<'a> Copy for QpackStringLiteral<'a>
Source§impl<'a> Debug for QpackStringLiteral<'a>
impl<'a> Debug for QpackStringLiteral<'a>
impl<'a> Eq for QpackStringLiteral<'a>
Source§impl<'a> PartialEq for QpackStringLiteral<'a>
impl<'a> PartialEq for QpackStringLiteral<'a>
impl<'a> StructuralPartialEq for QpackStringLiteral<'a>
Auto Trait Implementations§
impl<'a> Freeze for QpackStringLiteral<'a>
impl<'a> RefUnwindSafe for QpackStringLiteral<'a>
impl<'a> Send for QpackStringLiteral<'a>
impl<'a> Sync for QpackStringLiteral<'a>
impl<'a> Unpin for QpackStringLiteral<'a>
impl<'a> UnsafeUnpin for QpackStringLiteral<'a>
impl<'a> UnwindSafe for QpackStringLiteral<'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