pub trait TlsSession: Send {
// Required method
fn negotiated_protocol(&self) -> Option<&[u8]>;
}Expand description
Metadata available after a successful TLS handshake. Stream providers can also implement TlsStream for provider-neutral application I/O and orderly shutdown. Retire those operations and send any required TLS close notification before closing the underlying transport.
Required Methods§
Sourcefn negotiated_protocol(&self) -> Option<&[u8]>
fn negotiated_protocol(&self) -> Option<&[u8]>
The protocol selected by ALPN, or None if no protocol was negotiated. Protocol identifiers are opaque bytes; callers must decide whether the selected protocol is acceptable.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".