pub struct ImapSession {
pub state: ImapState,
pub tag: Option<String>,
pub username: Option<Username>,
pub mailbox_snapshot: Option<MailboxSnapshot>,
pub idle_timeout: Duration,
}Expand description
IMAP session
Fields§
§state: ImapState§tag: Option<String>§username: Option<Username>§mailbox_snapshot: Option<MailboxSnapshot>§idle_timeout: DurationImplementations§
Source§impl ImapSession
impl ImapSession
Sourcepub fn new_with_timeout(idle_timeout: Duration) -> Self
pub fn new_with_timeout(idle_timeout: Duration) -> Self
Create a new IMAP session with custom timeout
Sourcepub fn update_snapshot(&mut self, exists: u32, recent: u32)
pub fn update_snapshot(&mut self, exists: u32, recent: u32)
Update mailbox snapshot
Sourcepub fn mailbox_id(&self) -> Option<&MailboxId>
pub fn mailbox_id(&self) -> Option<&MailboxId>
Get mailbox ID from current state
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImapSession
impl RefUnwindSafe for ImapSession
impl Send for ImapSession
impl Sync for ImapSession
impl Unpin for ImapSession
impl UnsafeUnpin for ImapSession
impl UnwindSafe for ImapSession
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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