pub trait SessionStreams: Send + Sync {
// Required methods
fn peer_key(&self) -> [u8; 32];
fn accept_bi<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(BoxSend, BoxRecv)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close(&self, code: u32, reason: &[u8]);
// Provided method
fn is_closed(&self) -> bool { ... }
}Expand description
One authenticated peer connection (handshake already proved Self::peer_key).
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".