pub struct NullSession { /* private fields */ }Expand description
Mock TLS session.
Trait Implementations§
Source§impl CryptoSession for NullSession
impl CryptoSession for NullSession
Source§fn read_handshake(
&mut self,
level: Level,
data: &[u8],
) -> Result<(), CryptoError>
fn read_handshake( &mut self, level: Level, data: &[u8], ) -> Result<(), CryptoError>
Handshake bytes received at
level, in order.Source§fn write_handshake(&mut self, out: &mut Vec<u8>) -> Option<KeyChange>
fn write_handshake(&mut self, out: &mut Vec<u8>) -> Option<KeyChange>
Appends handshake bytes for the current write level. When it returns a key change,
later bytes belong to the next level.
Source§fn peer_transport_params(&self) -> Option<&[u8]>
fn peer_transport_params(&self) -> Option<&[u8]>
The peer’s encoded transport parameters, once received.
Source§fn alpn_protocol(&self) -> Option<&[u8]>
fn alpn_protocol(&self) -> Option<&[u8]>
The negotiated ALPN protocol.
fn is_handshaking(&self) -> bool
Source§fn set_version(&mut self, _version: u32)
fn set_version(&mut self, _version: u32)
Client: the connection continues in another QUIC version (compatible version
negotiation, RFC 9368) before any Handshake keys exist; later keys use its labels.
Source§fn server_name(&self) -> Option<&str>
fn server_name(&self) -> Option<&str>
Server: the SNI name the client sent.
Source§fn cipher_suite(&self) -> Option<u16>
fn cipher_suite(&self) -> Option<u16>
The negotiated TLS cipher suite (its IANA code,
0x1301…).Source§fn peer_certificates(&self) -> &[Vec<u8>]
fn peer_certificates(&self) -> &[Vec<u8>]
The peer’s verified certificate chain (DER, leaf first); empty without one.
Auto Trait Implementations§
impl Forget for NullSession
impl Freeze for NullSession
impl Move for NullSession
impl RefUnwindSafe for NullSession
impl Send for NullSession
impl Sync for NullSession
impl Unpin for NullSession
impl UnsafeUnpin for NullSession
impl UnwindSafe for NullSession
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