pub struct ServerHello<'a> { /* private fields */ }Expand description
A structurally validated ServerHello body.
Implementations§
Source§impl<'a> ServerHello<'a>
impl<'a> ServerHello<'a>
Sourcepub fn parse(bytes: &'a [u8]) -> Result<Self, TlsParseError>
pub fn parse(bytes: &'a [u8]) -> Result<Self, TlsParseError>
Parses an exact ServerHello body.
Sourcepub fn legacy_version(&self) -> TlsProtocolVersion
pub fn legacy_version(&self) -> TlsProtocolVersion
Returns the legacy ServerHello version.
Sourcepub fn session_id(&self) -> &'a [u8]
pub fn session_id(&self) -> &'a [u8]
Returns the echoed legacy session identifier.
Sourcepub fn cipher_suite(&self) -> TlsCipherSuite
pub fn cipher_suite(&self) -> TlsCipherSuite
Returns the selected cipher suite as its raw-preserving value.
Sourcepub fn compression_method(&self) -> TlsCompressionMethod
pub fn compression_method(&self) -> TlsCompressionMethod
Returns the selected legacy compression method.
Sourcepub fn is_hello_retry_request(&self) -> bool
pub fn is_hello_retry_request(&self) -> bool
Returns whether this ServerHello is a HelloRetryRequest.
Sourcepub fn extensions(&self) -> TlsExtensions<'a> ⓘ
pub fn extensions(&self) -> TlsExtensions<'a> ⓘ
Returns ordered extension TLVs.
Sourcepub fn selected_version(
&self,
) -> Result<Option<TlsProtocolVersion>, TlsParseError>
pub fn selected_version( &self, ) -> Result<Option<TlsProtocolVersion>, TlsParseError>
Returns the selected supported version when a valid server extension is present.
Trait Implementations§
Source§impl<'a> Clone for ServerHello<'a>
impl<'a> Clone for ServerHello<'a>
impl<'a> Copy for ServerHello<'a>
Source§impl<'a> Debug for ServerHello<'a>
impl<'a> Debug for ServerHello<'a>
impl<'a> Eq for ServerHello<'a>
Source§impl<'a> PartialEq for ServerHello<'a>
impl<'a> PartialEq for ServerHello<'a>
impl<'a> StructuralPartialEq for ServerHello<'a>
Auto Trait Implementations§
impl<'a> Freeze for ServerHello<'a>
impl<'a> RefUnwindSafe for ServerHello<'a>
impl<'a> Send for ServerHello<'a>
impl<'a> Sync for ServerHello<'a>
impl<'a> Unpin for ServerHello<'a>
impl<'a> UnsafeUnpin for ServerHello<'a>
impl<'a> UnwindSafe for ServerHello<'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