pub struct AuthOpts<'a> { /* private fields */ }Expand description
Authorization options, represented as a consuming builder. Used during extended authorization, translated to the AUTH packet.
Implementations§
source§impl<'a> AuthOpts<'a>
impl<'a> AuthOpts<'a>
sourcepub fn reason(self, val: AuthReason) -> Self
pub fn reason(self, val: AuthReason) -> Self
Sets a reason value.
sourcepub fn reason_string(self, val: &'a str)
pub fn reason_string(self, val: &'a str)
Sets a reason string property.
sourcepub fn authentication_method(self, val: &'a str) -> Self
pub fn authentication_method(self, val: &'a str) -> Self
Sets the name of the authentication method used for extended authorization.
sourcepub fn authentication_data(self, val: &'a [u8]) -> Self
pub fn authentication_data(self, val: &'a [u8]) -> Self
Sets the binary authentication data. Note that setting authentication data without authentication_method set will result in an error.
sourcepub fn user_property(self, (key, val): (&'a str, &'a str)) -> Self
pub fn user_property(self, (key, val): (&'a str, &'a str)) -> Self
Sets user properties as key-value pairs. Multiple user properties may be set.