pub struct TlsClientHello<'a> { /* private fields */ }Implementations§
Source§impl<'a> TlsClientHello<'a>
impl<'a> TlsClientHello<'a>
Sourcepub fn parse(buf: &'a [u8]) -> Option<Self>
pub fn parse(buf: &'a [u8]) -> Option<Self>
Parse a TLS ClientHello from raw bytes (Record → Handshake → ClientHello).
pub fn client_version(&self) -> u16
pub fn random(&self) -> Option<&[u8; 32]>
pub fn session_id(&self) -> &[u8] ⓘ
pub fn cipher_suites(&self) -> &[u16]
pub fn compression_methods(&self) -> &[u8] ⓘ
Sourcepub fn extensions(&self) -> TlsExtensionsIter<'a> ⓘ
pub fn extensions(&self) -> TlsExtensionsIter<'a> ⓘ
Iterate over TLS extensions.
Sourcepub fn server_name(&self) -> Option<&str>
pub fn server_name(&self) -> Option<&str>
Extract SNI server name from extension type 0x0000.
Sourcepub fn supported_versions(&self) -> Option<Vec<u16>>
pub fn supported_versions(&self) -> Option<Vec<u16>>
Extract supported_versions from TLS 1.3 extension type 0x002b.
Trait Implementations§
Source§impl<'a> Clone for TlsClientHello<'a>
impl<'a> Clone for TlsClientHello<'a>
Source§fn clone(&self) -> TlsClientHello<'a>
fn clone(&self) -> TlsClientHello<'a>
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 moreSource§impl<'a> Debug for TlsClientHello<'a>
impl<'a> Debug for TlsClientHello<'a>
Source§impl<'a> From<TlsClientHello<'a>> for AppPacket<'a>
impl<'a> From<TlsClientHello<'a>> for AppPacket<'a>
Source§fn from(p: TlsClientHello<'a>) -> Self
fn from(p: TlsClientHello<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for TlsClientHello<'a>
impl<'a> RefUnwindSafe for TlsClientHello<'a>
impl<'a> Send for TlsClientHello<'a>
impl<'a> Sync for TlsClientHello<'a>
impl<'a> Unpin for TlsClientHello<'a>
impl<'a> UnsafeUnpin for TlsClientHello<'a>
impl<'a> UnwindSafe for TlsClientHello<'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