pub trait Authenticator {
// Required method
fn mechanism(&self) -> &str;
// Provided methods
fn auth(&self) -> Option<String> { ... }
fn handle<'a, 'life0, 'async_trait, S>(
&'life0 self,
_communicator: Communicator<'a, S>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where S: 'async_trait + Read + Write + Unpin + Send,
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait { ... }
}
Required Methods§
Provided Methods§
Sourcefn auth(&self) -> Option<String>
fn auth(&self) -> Option<String>
If provided, the return string will be added as an argument to the initial “AUTH” command.
Will automatically be base64 encoded.
Sourcefn handle<'a, 'life0, 'async_trait, S>(
&'life0 self,
_communicator: Communicator<'a, S>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn handle<'a, 'life0, 'async_trait, S>( &'life0 self, _communicator: Communicator<'a, S>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Handle a handshake conversation between the server and the client.
The Communicator allows you to send and receive data needed for authentication
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.