pub trait Mechanism {
// Required methods
fn name(&self) -> &str;
fn from_credentials(
credentials: Credentials,
) -> Result<Self, MechanismError>
where Self: Sized;
// Provided methods
fn initial(&mut self) -> Vec<u8> ⓘ { ... }
fn response(&mut self, _challenge: &[u8]) -> Result<Vec<u8>, MechanismError> { ... }
fn success(&mut self, _data: &[u8]) -> Result<(), MechanismError> { ... }
}
Expand description
A trait which defines SASL mechanisms.
Required Methods§
Sourcefn from_credentials(credentials: Credentials) -> Result<Self, MechanismError>where
Self: Sized,
fn from_credentials(credentials: Credentials) -> Result<Self, MechanismError>where
Self: Sized,
Creates this mechanism from Credentials
.