Enum imap_types::auth::AuthMechanism
source · #[non_exhaustive]pub enum AuthMechanism<'a> {
Plain,
Login,
XOAuth2,
Other(AuthMechanismOther<'a>),
}
Expand description
Authentication mechanism.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Plain
The PLAIN SASL mechanism.
AUTH=PLAIN
base64(b"<authenticate-id>\x00<authorize-id>\x00<password>")
Reference(s):
- RFC4616: The PLAIN Simple Authentication and Security Layer (SASL) Mechanism
Login
The (non-standardized and slow) LOGIN SASL mechanism.
AUTH=LOGIN
base64(b"<username>")
base64(b"<password>")
Reference(s):
- draft-murchison-sasl-login-00: The LOGIN SASL Mechanism
XOAuth2
Google’s OAuth 2.0 mechanism.
AUTH=XOAUTH2
base64(b"user=<user>\x01auth=Bearer <token>\x01\x01")
Reference(s):
Other(AuthMechanismOther<'a>)
Some other (unknown) mechanism.
Trait Implementations§
source§impl<'a> Arbitrary<'a> for AuthMechanism<'a>
impl<'a> Arbitrary<'a> for AuthMechanism<'a>
source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl<'a> Clone for AuthMechanism<'a>
impl<'a> Clone for AuthMechanism<'a>
source§fn clone(&self) -> AuthMechanism<'a>
fn clone(&self) -> AuthMechanism<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for AuthMechanism<'a>
impl<'a> Debug for AuthMechanism<'a>
source§impl<'de, 'a> Deserialize<'de> for AuthMechanism<'a>
impl<'de, 'a> Deserialize<'de> for AuthMechanism<'a>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> Display for AuthMechanism<'a>
impl<'a> Display for AuthMechanism<'a>
source§impl<'a> From<Atom<'a>> for AuthMechanism<'a>
impl<'a> From<Atom<'a>> for AuthMechanism<'a>
source§impl<'a> Hash for AuthMechanism<'a>
impl<'a> Hash for AuthMechanism<'a>
source§impl<'a> IntoBoundedStatic for AuthMechanism<'a>
impl<'a> IntoBoundedStatic for AuthMechanism<'a>
§type Static = AuthMechanism<'static>
type Static = AuthMechanism<'static>
The target type is bounded by the
'static
lifetime.source§fn into_static(self) -> Self::Static
fn into_static(self) -> Self::Static
Convert an owned
T
into an owned T
such that T: 'static
.source§impl<'a> PartialEq<AuthMechanism<'a>> for AuthMechanism<'a>
impl<'a> PartialEq<AuthMechanism<'a>> for AuthMechanism<'a>
source§fn eq(&self, other: &AuthMechanism<'a>) -> bool
fn eq(&self, other: &AuthMechanism<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> Serialize for AuthMechanism<'a>
impl<'a> Serialize for AuthMechanism<'a>
source§impl<'a> ToBoundedStatic for AuthMechanism<'a>
impl<'a> ToBoundedStatic for AuthMechanism<'a>
source§impl<'a> TryFrom<&'a [u8]> for AuthMechanism<'a>
impl<'a> TryFrom<&'a [u8]> for AuthMechanism<'a>
source§impl<'a> TryFrom<&'a str> for AuthMechanism<'a>
impl<'a> TryFrom<&'a str> for AuthMechanism<'a>
source§impl<'a> TryFrom<String> for AuthMechanism<'a>
impl<'a> TryFrom<String> for AuthMechanism<'a>
impl<'a> Eq for AuthMechanism<'a>
impl<'a> StructuralEq for AuthMechanism<'a>
impl<'a> StructuralPartialEq for AuthMechanism<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for AuthMechanism<'a>
impl<'a> Send for AuthMechanism<'a>
impl<'a> Sync for AuthMechanism<'a>
impl<'a> Unpin for AuthMechanism<'a>
impl<'a> UnwindSafe for AuthMechanism<'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