pub struct PrefixedBlob<'a, L> {
pub blob: &'a [u8],
/* private fields */
}Expand description
PrefixedBlob is a length-prefixed string of bytes.
This is particularly useful for TLS messages. For example, the
opaque legacy_compression_methods<1..2^8-1> field from the TLS 1.3 RFC could
be decoded as PrefixedBlob<'a, u8>.
Fields§
§blob: &'a [u8]Trait Implementations§
Source§impl<'a, L: Into<usize> + DecoderValue<'a>> DecoderValue<'a> for PrefixedBlob<'a, L>
impl<'a, L: Into<usize> + DecoderValue<'a>> DecoderValue<'a> for PrefixedBlob<'a, L>
fn decode(bytes: DecoderBuffer<'a>) -> DecoderBufferResult<'a, Self>
Auto Trait Implementations§
impl<'a, L> Freeze for PrefixedBlob<'a, L>
impl<'a, L> RefUnwindSafe for PrefixedBlob<'a, L>where
L: RefUnwindSafe,
impl<'a, L> Send for PrefixedBlob<'a, L>where
L: Send,
impl<'a, L> Sync for PrefixedBlob<'a, L>where
L: Sync,
impl<'a, L> Unpin for PrefixedBlob<'a, L>where
L: Unpin,
impl<'a, L> UnsafeUnpin for PrefixedBlob<'a, L>
impl<'a, L> UnwindSafe for PrefixedBlob<'a, L>where
L: UnwindSafe,
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