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.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for AuthOpts<'a>
impl<'a> RefUnwindSafe for AuthOpts<'a>
impl<'a> Send for AuthOpts<'a>
impl<'a> Sync for AuthOpts<'a>
impl<'a> Unpin for AuthOpts<'a>
impl<'a> UnwindSafe for AuthOpts<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more