pub struct HpackStringLiteral<'a> { /* private fields */ }Expand description
A validated, exact borrowed HPACK string literal representation.
Implementations§
Source§impl<'a> HpackStringLiteral<'a>
impl<'a> HpackStringLiteral<'a>
Sourcepub fn parse(bytes: &'a [u8]) -> Result<Self, HpackStringLiteralParseError>
pub fn parse(bytes: &'a [u8]) -> Result<Self, HpackStringLiteralParseError>
Parses one RFC 7541 section 5.2 string literal and excludes any following bytes.
Sourcepub const fn as_bytes(self) -> &'a [u8]
pub const fn as_bytes(self) -> &'a [u8]
Returns the exact string literal representation, excluding any following bytes.
Sourcepub const fn is_huffman(self) -> bool
pub const fn is_huffman(self) -> bool
Reports whether encoded_bytes are RFC 7541 Huffman-coded.
Sourcepub fn encoded_bytes(self) -> &'a [u8]
pub fn encoded_bytes(self) -> &'a [u8]
Returns the opaque encoded payload without decoding Huffman data.
Sourcepub const fn length(self) -> HpackInteger<'a>
pub const fn length(self) -> HpackInteger<'a>
Returns the exact raw-preserving HPACK length representation.
Trait Implementations§
Source§impl<'a> Clone for HpackStringLiteral<'a>
impl<'a> Clone for HpackStringLiteral<'a>
impl<'a> Copy for HpackStringLiteral<'a>
Source§impl<'a> Debug for HpackStringLiteral<'a>
impl<'a> Debug for HpackStringLiteral<'a>
impl<'a> Eq for HpackStringLiteral<'a>
Source§impl<'a> PartialEq for HpackStringLiteral<'a>
impl<'a> PartialEq for HpackStringLiteral<'a>
impl<'a> StructuralPartialEq for HpackStringLiteral<'a>
Auto Trait Implementations§
impl<'a> Freeze for HpackStringLiteral<'a>
impl<'a> RefUnwindSafe for HpackStringLiteral<'a>
impl<'a> Send for HpackStringLiteral<'a>
impl<'a> Sync for HpackStringLiteral<'a>
impl<'a> Unpin for HpackStringLiteral<'a>
impl<'a> UnsafeUnpin for HpackStringLiteral<'a>
impl<'a> UnwindSafe for HpackStringLiteral<'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