pub struct ClientHello<'a> { /* private fields */ }Expand description
A structurally validated ClientHello body.
Implementations§
Source§impl<'a> ClientHello<'a>
impl<'a> ClientHello<'a>
Sourcepub fn parse(bytes: &'a [u8]) -> Result<Self, TlsParseError>
pub fn parse(bytes: &'a [u8]) -> Result<Self, TlsParseError>
Parses an exact ClientHello body.
Sourcepub fn legacy_version(&self) -> TlsProtocolVersion
pub fn legacy_version(&self) -> TlsProtocolVersion
Returns the legacy ClientHello version.
Sourcepub fn session_id(&self) -> &'a [u8]
pub fn session_id(&self) -> &'a [u8]
Returns the legacy session identifier.
Sourcepub fn cipher_suites(&self) -> impl Iterator<Item = TlsCipherSuite> + 'a
pub fn cipher_suites(&self) -> impl Iterator<Item = TlsCipherSuite> + 'a
Returns ordered offered cipher suites.
Sourcepub fn compression_methods(
&self,
) -> impl Iterator<Item = TlsCompressionMethod> + 'a
pub fn compression_methods( &self, ) -> impl Iterator<Item = TlsCompressionMethod> + 'a
Returns ordered legacy compression methods.
Sourcepub fn extensions(&self) -> TlsExtensions<'a> ⓘ
pub fn extensions(&self) -> TlsExtensions<'a> ⓘ
Returns ordered extension TLVs.
Sourcepub fn offers_tls13(&self) -> bool
pub fn offers_tls13(&self) -> bool
Returns whether a valid supported_versions extension includes TLS 1.3.
Trait Implementations§
Source§impl<'a> Clone for ClientHello<'a>
impl<'a> Clone for ClientHello<'a>
impl<'a> Copy for ClientHello<'a>
Source§impl<'a> Debug for ClientHello<'a>
impl<'a> Debug for ClientHello<'a>
impl<'a> Eq for ClientHello<'a>
Source§impl<'a> PartialEq for ClientHello<'a>
impl<'a> PartialEq for ClientHello<'a>
impl<'a> StructuralPartialEq for ClientHello<'a>
Auto Trait Implementations§
impl<'a> Freeze for ClientHello<'a>
impl<'a> RefUnwindSafe for ClientHello<'a>
impl<'a> Send for ClientHello<'a>
impl<'a> Sync for ClientHello<'a>
impl<'a> Unpin for ClientHello<'a>
impl<'a> UnsafeUnpin for ClientHello<'a>
impl<'a> UnwindSafe for ClientHello<'a>
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