pub struct LegacyRecordVersion(/* private fields */);Expand description
Two preserved legacy record-version bytes.
Parsing TLS 1.3 plaintext preserves this field but deliberately does not use it for version selection or validation, as required by RFC 9846.
Implementations§
Source§impl LegacyRecordVersion
impl LegacyRecordVersion
Sourcepub const fn from_bytes(bytes: [u8; 2]) -> Self
pub const fn from_bytes(bytes: [u8; 2]) -> Self
Preserves two caller-provided bytes without interpreting a version.
Sourcepub const fn tls13_default() -> Self
pub const fn tls13_default() -> Self
Returns the default legacy version emitted by TLS 1.3 records.
Sourcepub const fn tls13_initial_client_hello() -> Self
pub const fn tls13_initial_client_hello() -> Self
Returns the compatibility value permitted for an initial ClientHello.
Sourcepub const fn dtls13_default() -> Self
pub const fn dtls13_default() -> Self
Returns the default legacy version emitted by DTLS 1.3 plaintext.
Sourcepub const fn dtls13_initial_client_hello() -> Self
pub const fn dtls13_initial_client_hello() -> Self
Returns the compatibility value permitted for an initial ClientHello.
Trait Implementations§
Source§impl Clone for LegacyRecordVersion
impl Clone for LegacyRecordVersion
Source§fn clone(&self) -> LegacyRecordVersion
fn clone(&self) -> LegacyRecordVersion
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 Copy for LegacyRecordVersion
Source§impl Debug for LegacyRecordVersion
impl Debug for LegacyRecordVersion
impl Eq for LegacyRecordVersion
Source§impl Hash for LegacyRecordVersion
impl Hash for LegacyRecordVersion
Source§impl PartialEq for LegacyRecordVersion
impl PartialEq for LegacyRecordVersion
impl StructuralPartialEq for LegacyRecordVersion
Auto Trait Implementations§
impl Freeze for LegacyRecordVersion
impl RefUnwindSafe for LegacyRecordVersion
impl Send for LegacyRecordVersion
impl Sync for LegacyRecordVersion
impl Unpin for LegacyRecordVersion
impl UnsafeUnpin for LegacyRecordVersion
impl UnwindSafe for LegacyRecordVersion
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