pub(crate) trait ChannelInitiatorHandshake<T>: ChannelBaseHandshake<T>{
// Provided method
async fn recv_cells_from_responder(
&mut self,
auth_log_action: AuthLogAction,
) -> Result<(AuthChallenge, Certs, (Netinfo, Instant), Option<SlogDigest>)> { ... }
}Expand description
Handshake initiator base trait. All initiator handshake should implement this trait in order to enjoy the helper functions.
It requires the base handshake trait to be implement for access to the base getters.
Provided Methods§
Sourceasync fn recv_cells_from_responder(
&mut self,
auth_log_action: AuthLogAction,
) -> Result<(AuthChallenge, Certs, (Netinfo, Instant), Option<SlogDigest>)>
async fn recv_cells_from_responder( &mut self, auth_log_action: AuthLogAction, ) -> Result<(AuthChallenge, Certs, (Netinfo, Instant), Option<SlogDigest>)>
As an initiator, we are expecting the responder’s cells which are:
Any duplicate, missing cell or unexpected results in a protocol level error.
This returns the:
- msg::AuthChallenge cell
- msg::Certs cell
- msg::Netinfo cell
- the instant when the netinfo cell was received (needed for the clock skew calculation)
- the SLOG digest if
auth_log_actionisAuthLogAction::Take(needed if we send an msg::Authenticate cell in the future)
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.
Implementors§
impl<T, S> ChannelInitiatorHandshake<T> for ClientInitiatorHandshake<T, S>where
T: AsyncRead + AsyncWrite + StreamOps + Send + Unpin + 'static,
S: CoarseTimeProvider + SleepProvider,
Implement the initiator channel handshake trait.
impl<T, S> ChannelInitiatorHandshake<T> for RelayInitiatorHandshake<T, S>where
T: AsyncRead + AsyncWrite + CertifiedConn + StreamOps + Send + Unpin + 'static,
S: CoarseTimeProvider + SleepProvider,
Implement the initiator channel handshake trait.