pub trait ServerAuthentication<Peer> {
type Identity;
type Error;
// Required methods
fn start<'a>(
&'a mut self,
request: ServerAuthenticationRequest<'a, Peer>,
) -> ServerAuthenticationFuture<'a, ServerAuthenticationAction<Self::Identity>, Self::Error>;
fn respond<'a>(
&'a mut self,
request: ServerAuthenticationRequest<'a, Peer>,
response: ServerAuthenticationResponse,
) -> ServerAuthenticationFuture<'a, ServerAuthenticationAction<Self::Identity>, Self::Error>;
}Expand description
Per-connection asynchronous authentication policy.
Required Associated Types§
Required Methods§
Sourcefn start<'a>(
&'a mut self,
request: ServerAuthenticationRequest<'a, Peer>,
) -> ServerAuthenticationFuture<'a, ServerAuthenticationAction<Self::Identity>, Self::Error>
fn start<'a>( &'a mut self, request: ServerAuthenticationRequest<'a, Peer>, ) -> ServerAuthenticationFuture<'a, ServerAuthenticationAction<Self::Identity>, Self::Error>
Starts the application-driven authentication conversation.
Sourcefn respond<'a>(
&'a mut self,
request: ServerAuthenticationRequest<'a, Peer>,
response: ServerAuthenticationResponse,
) -> ServerAuthenticationFuture<'a, ServerAuthenticationAction<Self::Identity>, Self::Error>
fn respond<'a>( &'a mut self, request: ServerAuthenticationRequest<'a, Peer>, response: ServerAuthenticationResponse, ) -> ServerAuthenticationFuture<'a, ServerAuthenticationAction<Self::Identity>, Self::Error>
Advances the conversation after one protocol response.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".