pub struct Handshake<C> { /* private fields */ }Expand description
The pre-initialized connection state. Consuming initialize makes sending
it twice unrepresentable through this API.
Implementations§
Source§impl<C: HandshakeConnection> Handshake<C>
impl<C: HandshakeConnection> Handshake<C>
Sourcepub async fn initialize(
self,
params: InitializeParams,
) -> Result<Initialized<C>, HandshakeError<C::Error>>
pub async fn initialize( self, params: InitializeParams, ) -> Result<Initialized<C>, HandshakeError<C::Error>>
Run initialize exactly once and complete the initialized sequence.
A served fingerprint mismatch is attached to the returned ready state;
it never prevents the final notification or discards the connection.
To keep the accepted connection after an initialized notify failure,
call Self::initialize_preserving_connection.
Sourcepub async fn initialize_preserving_connection(
self,
params: InitializeParams,
) -> Result<Initialized<C>, HandshakeRecoveryError<C, C::Error>>
pub async fn initialize_preserving_connection( self, params: InitializeParams, ) -> Result<Initialized<C>, HandshakeRecoveryError<C, C::Error>>
Run initialize and preserve the accepted connection if initialized
fails after the server accepted the request.
Auto Trait Implementations§
impl<C> Forget for Handshake<C>
impl<C> Freeze for Handshake<C>where
C: Freeze,
impl<C> Move for Handshake<C>
impl<C> RefUnwindSafe for Handshake<C>where
C: RefUnwindSafe,
impl<C> Send for Handshake<C>where
C: Send,
impl<C> Sync for Handshake<C>where
C: Sync,
impl<C> Unpin for Handshake<C>where
C: Unpin,
impl<C> UnsafeUnpin for Handshake<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for Handshake<C>where
C: UnwindSafe,
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