pub enum ImapSessionOpenError {
Show 16 variants
StartTlsOverTls,
StartTlsInjection,
UnsupportedMechanism(SaslMechanism),
UrlMissingHost(String),
UrlUnsupportedScheme(String, String),
InvalidLoginCredentials(ValidationError),
StartTls(ImapStartTlsError),
Greeting(ImapGreetingGetError),
Capability(ImapCapabilityGetError),
Login(ImapLoginError),
AuthAnonymous(ImapAuthAnonymousError),
AuthLogin(ImapAuthLoginError),
AuthPlain(ImapAuthPlainError),
AuthOauthbearer(ImapAuthOauthbearerError),
AuthXoauth2(ImapAuthXoauth2Error),
AuthScramSha256(ImapAuthScramSha256Error),
}Expand description
Failure causes while opening an IMAP session.
Variants§
StartTlsOverTls
STARTTLS was requested on a transport that is already TLS.
StartTlsInjection
The server sent bytes past the STARTTLS tagged response.
RFC 3501 §6.2.1 forbids them, so their presence means an attacker injected plaintext commands the server will replay inside the TLS session. The upgrade is refused rather than performed.
UnsupportedMechanism(SaslMechanism)
Credentials were given for a mechanism this crate does not frame.
io-sasl computes more mechanisms than IMAP wires up here; the ones left out are named rather than silently skipped, so a caller learns which of its credentials this crate cannot use.
UrlMissingHost(String)
url only.The URL carries no host to connect to.
UrlUnsupportedScheme(String, String)
url only.The URL scheme is none of imap, imaps and unix.
InvalidLoginCredentials(ValidationError)
The LOGIN user or password failed imap-types validation.
StartTls(ImapStartTlsError)
The STARTTLS coroutine failed.
Greeting(ImapGreetingGetError)
The greeting coroutine failed.
Capability(ImapCapabilityGetError)
The CAPABILITY coroutine failed.
Login(ImapLoginError)
The LOGIN coroutine failed.
AuthAnonymous(ImapAuthAnonymousError)
The SASL ANONYMOUS coroutine failed.
AuthLogin(ImapAuthLoginError)
The SASL LOGIN coroutine failed.
AuthPlain(ImapAuthPlainError)
The SASL PLAIN coroutine failed.
AuthOauthbearer(ImapAuthOauthbearerError)
The SASL OAUTHBEARER coroutine failed.
AuthXoauth2(ImapAuthXoauth2Error)
The SASL XOAUTH2 coroutine failed.
AuthScramSha256(ImapAuthScramSha256Error)
scram only.The SASL SCRAM-SHA-256 coroutine failed.
Trait Implementations§
Source§impl Debug for ImapSessionOpenError
impl Debug for ImapSessionOpenError
Source§impl Display for ImapSessionOpenError
impl Display for ImapSessionOpenError
Source§impl Error for ImapSessionOpenError
impl Error for ImapSessionOpenError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ImapAuthAnonymousError> for ImapSessionOpenError
impl From<ImapAuthAnonymousError> for ImapSessionOpenError
Source§fn from(source: ImapAuthAnonymousError) -> Self
fn from(source: ImapAuthAnonymousError) -> Self
Source§impl From<ImapAuthLoginError> for ImapSessionOpenError
impl From<ImapAuthLoginError> for ImapSessionOpenError
Source§fn from(source: ImapAuthLoginError) -> Self
fn from(source: ImapAuthLoginError) -> Self
Source§impl From<ImapAuthOauthbearerError> for ImapSessionOpenError
impl From<ImapAuthOauthbearerError> for ImapSessionOpenError
Source§fn from(source: ImapAuthOauthbearerError) -> Self
fn from(source: ImapAuthOauthbearerError) -> Self
Source§impl From<ImapAuthPlainError> for ImapSessionOpenError
impl From<ImapAuthPlainError> for ImapSessionOpenError
Source§fn from(source: ImapAuthPlainError) -> Self
fn from(source: ImapAuthPlainError) -> Self
Source§impl From<ImapAuthScramSha256Error> for ImapSessionOpenError
impl From<ImapAuthScramSha256Error> for ImapSessionOpenError
Source§fn from(source: ImapAuthScramSha256Error) -> Self
fn from(source: ImapAuthScramSha256Error) -> Self
Source§impl From<ImapAuthXoauth2Error> for ImapSessionOpenError
impl From<ImapAuthXoauth2Error> for ImapSessionOpenError
Source§fn from(source: ImapAuthXoauth2Error) -> Self
fn from(source: ImapAuthXoauth2Error) -> Self
Source§impl From<ImapCapabilityGetError> for ImapSessionOpenError
impl From<ImapCapabilityGetError> for ImapSessionOpenError
Source§fn from(source: ImapCapabilityGetError) -> Self
fn from(source: ImapCapabilityGetError) -> Self
Source§impl From<ImapGreetingGetError> for ImapSessionOpenError
impl From<ImapGreetingGetError> for ImapSessionOpenError
Source§fn from(source: ImapGreetingGetError) -> Self
fn from(source: ImapGreetingGetError) -> Self
Source§impl From<ImapLoginError> for ImapSessionOpenError
impl From<ImapLoginError> for ImapSessionOpenError
Source§fn from(source: ImapLoginError) -> Self
fn from(source: ImapLoginError) -> Self
Source§impl From<ImapSessionOpenError> for ImapClientError
Available on crate feature client only.
impl From<ImapSessionOpenError> for ImapClientError
client only.