pub trait Handshake:
Send
+ Sync
+ 'static {
// Required method
fn handshake<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sender: &'life1 Sender<Message>,
receiver: &'life2 Receiver<Message>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Trait implemented by custom handshake handlers that negotiate with the server immediately after the socket opens and before it is marked connected.
Required Methods§
Sourcefn handshake<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sender: &'life1 Sender<Message>,
receiver: &'life2 Receiver<Message>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handshake<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
sender: &'life1 Sender<Message>,
receiver: &'life2 Receiver<Message>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Perform the handshake using the given send and receive channels, returning once negotiation has succeeded or failed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".