pub struct Dtls13Ciphertext<'input> { /* private fields */ }Expand description
One borrowed protected DTLS 1.3 record with its exact header bytes.
Implementations§
Source§impl<'input> Dtls13Ciphertext<'input>
impl<'input> Dtls13Ciphertext<'input>
Sourcepub fn parse(
policy: WirePolicy,
config: Dtls13CiphertextConfig,
input: &'input [u8],
) -> Result<(Self, &'input [u8]), RecordError>
pub fn parse( policy: WirePolicy, config: Dtls13CiphertextConfig, input: &'input [u8], ) -> Result<(Self, &'input [u8]), RecordError>
Parses one protected DTLS 1.3 record under an exact CID context.
A record without a length field consumes the rest of the datagram.
Sourcepub const fn unified_header(&self) -> &'input [u8]
pub const fn unified_header(&self) -> &'input [u8]
Returns the exact encoded unified header.
Sourcepub const fn connection_id(&self) -> &'input [u8]
pub const fn connection_id(&self) -> &'input [u8]
Returns the exact borrowed Connection ID.
Sourcepub const fn sequence(&self) -> Dtls13Sequence
pub const fn sequence(&self) -> Dtls13Sequence
Returns the encoded truncated sequence number.
Sourcepub const fn epoch_bits(&self) -> u8
pub const fn epoch_bits(&self) -> u8
Returns the low two encoded epoch bits.
Sourcepub const fn length_present(&self) -> bool
pub const fn length_present(&self) -> bool
Reports whether the wire header contained an explicit length.
Sourcepub const fn encrypted_record(&self) -> &'input [u8]
pub const fn encrypted_record(&self) -> &'input [u8]
Returns the exact borrowed protected fragment.
Trait Implementations§
Source§impl<'input> Clone for Dtls13Ciphertext<'input>
impl<'input> Clone for Dtls13Ciphertext<'input>
Source§fn clone(&self) -> Dtls13Ciphertext<'input>
fn clone(&self) -> Dtls13Ciphertext<'input>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'input> Copy for Dtls13Ciphertext<'input>
impl<'input> Eq for Dtls13Ciphertext<'input>
Source§impl<'input> PartialEq for Dtls13Ciphertext<'input>
impl<'input> PartialEq for Dtls13Ciphertext<'input>
impl<'input> StructuralPartialEq for Dtls13Ciphertext<'input>
Auto Trait Implementations§
impl<'input> Freeze for Dtls13Ciphertext<'input>
impl<'input> RefUnwindSafe for Dtls13Ciphertext<'input>
impl<'input> Send for Dtls13Ciphertext<'input>
impl<'input> Sync for Dtls13Ciphertext<'input>
impl<'input> Unpin for Dtls13Ciphertext<'input>
impl<'input> UnsafeUnpin for Dtls13Ciphertext<'input>
impl<'input> UnwindSafe for Dtls13Ciphertext<'input>
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