pub struct Dtls12Ciphertext<'input> { /* private fields */ }Expand description
One borrowed protected DTLS 1.2 record.
Implementations§
Source§impl<'input> Dtls12Ciphertext<'input>
impl<'input> Dtls12Ciphertext<'input>
Sourcepub fn new(
policy: WirePolicy,
content_type: ContentTypeCode,
legacy_record_version: LegacyRecordVersion,
epoch: u16,
sequence_number: [u8; 6],
fragment: &'input [u8],
) -> Result<Self, RecordError>
pub fn new( policy: WirePolicy, content_type: ContentTypeCode, legacy_record_version: LegacyRecordVersion, epoch: u16, sequence_number: [u8; 6], fragment: &'input [u8], ) -> Result<Self, RecordError>
Constructs a checked protected DTLS 1.2 envelope for encoding.
Sourcepub fn parse(
policy: WirePolicy,
input: &'input [u8],
) -> Result<(Self, &'input [u8]), RecordError>
pub fn parse( policy: WirePolicy, input: &'input [u8], ) -> Result<(Self, &'input [u8]), RecordError>
Parses one protected DTLS 1.2 record and returns the datagram suffix.
Sourcepub const fn content_type(&self) -> ContentType
pub const fn content_type(&self) -> ContentType
Returns the admitted outer content type.
Sourcepub const fn legacy_record_version(&self) -> LegacyRecordVersion
pub const fn legacy_record_version(&self) -> LegacyRecordVersion
Returns the preserved record-version bytes.
Sourcepub const fn sequence_number(&self) -> [u8; 6]
pub const fn sequence_number(&self) -> [u8; 6]
Returns the exact encoded 48-bit sequence number.
Sourcepub const fn encoded_len(&self) -> usize
pub const fn encoded_len(&self) -> usize
Returns the complete encoded length.
Trait Implementations§
Source§impl<'input> Clone for Dtls12Ciphertext<'input>
impl<'input> Clone for Dtls12Ciphertext<'input>
Source§fn clone(&self) -> Dtls12Ciphertext<'input>
fn clone(&self) -> Dtls12Ciphertext<'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 Dtls12Ciphertext<'input>
impl<'input> Eq for Dtls12Ciphertext<'input>
Source§impl<'input> PartialEq for Dtls12Ciphertext<'input>
impl<'input> PartialEq for Dtls12Ciphertext<'input>
impl<'input> StructuralPartialEq for Dtls12Ciphertext<'input>
Auto Trait Implementations§
impl<'input> Freeze for Dtls12Ciphertext<'input>
impl<'input> RefUnwindSafe for Dtls12Ciphertext<'input>
impl<'input> Send for Dtls12Ciphertext<'input>
impl<'input> Sync for Dtls12Ciphertext<'input>
impl<'input> Unpin for Dtls12Ciphertext<'input>
impl<'input> UnsafeUnpin for Dtls12Ciphertext<'input>
impl<'input> UnwindSafe for Dtls12Ciphertext<'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