Trait sasl::SaslMechanism
[−]
[src]
pub trait SaslMechanism { fn name(&self) -> &str; fn from_credentials(credentials: SaslCredentials) -> Result<Self, String> where Self: Sized; fn initial(&mut self) -> Result<Vec<u8>, String> { ... } fn response(&mut self, _challenge: &[u8]) -> Result<Vec<u8>, String> { ... } fn success(&mut self, _data: &[u8]) -> Result<(), String> { ... } }
Required Methods
fn name(&self) -> &str
The name of the mechanism.
fn from_credentials(credentials: SaslCredentials) -> Result<Self, String> where Self: Sized
Creates this mechanism from SaslCredentials
.
Provided Methods
fn initial(&mut self) -> Result<Vec<u8>, String>
Provides initial payload of the SASL mechanism.
fn response(&mut self, _challenge: &[u8]) -> Result<Vec<u8>, String>
Creates a response to the SASL challenge.
fn success(&mut self, _data: &[u8]) -> Result<(), String>
Verifies the server success response, if there is one.
Implementors
impl SaslMechanism for Anonymous
impl SaslMechanism for Plain
impl<S: ScramProvider> SaslMechanism for Scram<S>