Trait sasl::Mechanism [] [src]

pub trait Mechanism {
    fn name(&self) -> &str;
    fn from_credentials(credentials: Credentials) -> 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> { ... }
}

A trait which defines SASL mechanisms.

Required Methods

The name of the mechanism.

Creates this mechanism from Credentials.

Provided Methods

Provides initial payload of the SASL mechanism.

Creates a response to the SASL challenge.

Verifies the server success response, if there is one.

Implementors