#![deny(missing_docs)] and lots of documentation

This commit is contained in:
lumi 2017-02-28 13:05:17 +01:00
commit c56676a601
6 changed files with 83 additions and 4 deletions

View file

@ -4,12 +4,17 @@ use SaslCredentials;
use SaslMechanism;
use SaslSecret;
/// A struct for the SASL PLAIN mechanism.
pub struct Plain {
username: String,
password: String,
}
impl Plain {
/// Constructs a new struct for authenticating using the SASL PLAIN mechanism.
///
/// It is recommended that instead you use a `SaslCredentials` struct and turn it into the
/// requested mechanism using `from_credentials`.
pub fn new<N: Into<String>, P: Into<String>>(username: N, password: P) -> Plain {
Plain {
username: username.into(),