pub trait Session:
CryptoSuite
+ Sized
+ Send
+ Debug {
// Required method
fn poll<C: Context<Self>>(
&mut self,
context: &mut C,
) -> Poll<Result<(), Error>>;
// Provided methods
fn process_post_handshake_message<C: Context<Self>>(
&mut self,
_context: &mut C,
) -> Result<(), Error> { ... }
fn should_discard_session(&self) -> bool { ... }
fn parse_hello(
msg_type: HandshakeType,
header_chunk: &[u8],
total_received_len: u64,
max_hello_size: u64,
) -> Result<Option<HelloOffsets>, Error> { ... }
}Required Methods§
Provided Methods§
fn process_post_handshake_message<C: Context<Self>>( &mut self, _context: &mut C, ) -> Result<(), Error>
fn should_discard_session(&self) -> bool
Sourcefn parse_hello(
msg_type: HandshakeType,
header_chunk: &[u8],
total_received_len: u64,
max_hello_size: u64,
) -> Result<Option<HelloOffsets>, Error>
fn parse_hello( msg_type: HandshakeType, header_chunk: &[u8], total_received_len: u64, max_hello_size: u64, ) -> Result<Option<HelloOffsets>, Error>
Parses a hello message of the provided type
The default implementation of this function assumes TLS messages are being exchanged.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.