pub struct TlsCiphertext<'input> { /* private fields */ }Expand description
One borrowed protected TLS record.
Implementations§
Source§impl<'input> TlsCiphertext<'input>
impl<'input> TlsCiphertext<'input>
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 TLS 1.2 or TLS 1.3 record.
Sourcepub fn new(
policy: WirePolicy,
content_type: ContentTypeCode,
legacy_record_version: LegacyRecordVersion,
fragment: &'input [u8],
) -> Result<Self, RecordError>
pub fn new( policy: WirePolicy, content_type: ContentTypeCode, legacy_record_version: LegacyRecordVersion, fragment: &'input [u8], ) -> Result<Self, RecordError>
Constructs a checked protected envelope for encoding.
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 exact outer legacy-version bytes.
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 TlsCiphertext<'input>
impl<'input> Clone for TlsCiphertext<'input>
Source§fn clone(&self) -> TlsCiphertext<'input>
fn clone(&self) -> TlsCiphertext<'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 TlsCiphertext<'input>
impl<'input> Eq for TlsCiphertext<'input>
Source§impl<'input> PartialEq for TlsCiphertext<'input>
impl<'input> PartialEq for TlsCiphertext<'input>
impl<'input> StructuralPartialEq for TlsCiphertext<'input>
Auto Trait Implementations§
impl<'input> Freeze for TlsCiphertext<'input>
impl<'input> RefUnwindSafe for TlsCiphertext<'input>
impl<'input> Send for TlsCiphertext<'input>
impl<'input> Sync for TlsCiphertext<'input>
impl<'input> Unpin for TlsCiphertext<'input>
impl<'input> UnsafeUnpin for TlsCiphertext<'input>
impl<'input> UnwindSafe for TlsCiphertext<'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