add some documentation to src/sasl/mod.rs

This commit is contained in:
lumi 2017-02-25 15:50:26 +01:00
parent a88d9aa566
commit 4f357f773b

View file

@ -1,13 +1,17 @@
//! Provides the `SaslMechanism` trait and some implementations. //! Provides the `SaslMechanism` trait and some implementations.
/// A struct containing SASL credentials.
pub struct SaslCredentials { pub struct SaslCredentials {
pub username: String, pub username: String,
pub secret: SaslSecret, pub secret: SaslSecret,
pub channel_binding: Option<Vec<u8>>, pub channel_binding: Option<Vec<u8>>,
} }
/// Represents a SASL secret, like a password.
pub enum SaslSecret { pub enum SaslSecret {
/// No extra data needed.
None, None,
/// Password required.
Password(String), Password(String),
} }