pub enum ImapSessionTransport {
Tcp {
host: String,
port: u16,
},
Tls {
host: String,
port: u16,
},
Unix(String),
}Expand description
Where and how the connection is opened.
The scheme table that maps an IMAP URL onto one of these variants is
protocol knowledge, so it lives here rather than in the transport
layer; see ImapSessionTransport::from_url.
Variants§
Tcp
Plain TCP, the imap:// scheme. Pair it with
ImapSessionOpenOptions::starttls to reach a TLS session.
Tls
Implicit TLS, the imaps:// scheme.
Unix(String)
A local unix domain socket, the unix:// scheme, typically a
pre-authenticated socket proxy answering with a PREAUTH greeting.
Implementations§
Source§impl ImapSessionTransport
impl ImapSessionTransport
Sourcepub fn from_url(url: &Url) -> Result<Self, ImapSessionOpenError>
Available on crate feature url only.
pub fn from_url(url: &Url) -> Result<Self, ImapSessionOpenError>
url only.Reads the transport out of an IMAP URL.
imap:// is plain TCP on port 143, imaps:// is implicit TLS on
port 993 and unix:// is a local socket path; an explicit port in
the URL wins over the default.
Trait Implementations§
Source§impl Clone for ImapSessionTransport
impl Clone for ImapSessionTransport
Source§fn clone(&self) -> ImapSessionTransport
fn clone(&self) -> ImapSessionTransport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImapSessionTransport
impl Debug for ImapSessionTransport
impl Eq for ImapSessionTransport
Source§impl PartialEq for ImapSessionTransport
impl PartialEq for ImapSessionTransport
impl StructuralPartialEq for ImapSessionTransport
Auto Trait Implementations§
impl Freeze for ImapSessionTransport
impl RefUnwindSafe for ImapSessionTransport
impl Send for ImapSessionTransport
impl Sync for ImapSessionTransport
impl Unpin for ImapSessionTransport
impl UnsafeUnpin for ImapSessionTransport
impl UnwindSafe for ImapSessionTransport
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