Struct sasl::mechanisms::Plain
[−]
[src]
pub struct Plain { /* fields omitted */ }
A struct for the SASL PLAIN mechanism.
Methods
impl Plain
[src]
fn new<N: Into<String>, P: Into<String>>(username: N, password: P) -> Plain
Constructs a new struct for authenticating using the SASL PLAIN mechanism.
It is recommended that instead you use a Credentials
struct and turn it into the
requested mechanism using from_credentials
.
Trait Implementations
impl Mechanism for Plain
[src]
fn name(&self) -> &str
The name of the mechanism.
fn from_credentials(credentials: Credentials) -> Result<Plain, String>
Creates this mechanism from Credentials
.
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.