UnsealedPacket

Struct UnsealedPacket 

Source
pub struct UnsealedPacket<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> UnsealedPacket<'a>

Source

pub fn new( buf: &'a mut [u8], total_len: usize, body_range: Range<usize>, blind_addr_range: Option<Range<usize>>, mic_range: Range<usize>, sec_info_range: Range<usize>, aad_static_options: Range<usize>, ) -> Self

Source

pub fn header(&self) -> Result<PacketHeader, ParseError>

Source

pub fn body(&self) -> &[u8]

Source

pub fn body_mut(&mut self) -> &mut [u8]

Source

pub fn blind_addr_range(&self) -> Option<Range<usize>>

Source

pub fn blind_addr(&self) -> Option<&[u8]>

Source

pub fn mic_slot(&mut self) -> &mut [u8]

Source

pub fn as_bytes(&self) -> &[u8]

Source

pub fn as_bytes_mut(&mut self) -> &mut [u8]

Source

pub fn total_len(&self) -> usize

Source

pub fn sec_info_range(&self) -> Range<usize>

Source

pub fn aad_static_options(&self) -> Range<usize>

Trait Implementations§

Source§

impl<'a> Debug for UnsealedPacket<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> PartialEq for UnsealedPacket<'a>

Source§

fn eq(&self, other: &UnsealedPacket<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> Eq for UnsealedPacket<'a>

Source§

impl<'a> StructuralPartialEq for UnsealedPacket<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for UnsealedPacket<'a>

§

impl<'a> RefUnwindSafe for UnsealedPacket<'a>

§

impl<'a> Send for UnsealedPacket<'a>

§

impl<'a> Sync for UnsealedPacket<'a>

§

impl<'a> Unpin for UnsealedPacket<'a>

§

impl<'a> !UnwindSafe for UnsealedPacket<'a>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where 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>

Performs the conversion.