pub struct Imap {
pub facts: Facts,
/* private fields */
}Expand description
A handle on the connection: the facts, and the thread doing the talking.
Fields§
§facts: FactsImplementations§
Source§impl Imap
impl Imap
Sourcepub fn abort(&self)
pub fn abort(&self)
mutt’s Ctrl+G: cut the job in flight short. The socket goes down, whatever was blocked on it fails, and the next job reconnects. Does nothing when nothing is running.
Sourcepub fn progress_sink(slot: &Arc<Mutex<Option<String>>>) -> Progress
pub fn progress_sink(slot: &Arc<Mutex<Option<String>>>) -> Progress
A progress callback that writes where Imap::progress can
read it, for the open that happens before there is a thread.
Sourcepub fn take_progress(&mut self) -> Option<String>
pub fn take_progress(&mut self) -> Option<String>
The last thing the connection said it was doing, taken.
Sourcepub fn collect(&mut self) -> Option<Result<Done>>
pub fn collect(&mut self) -> Option<Result<Done>>
The answer, if the job is done; None while it is still running.
Sourcepub fn blocking(&mut self, job: Job) -> Result<Done>
pub fn blocking(&mut self, job: Job) -> Result<Done>
Run a job and wait for it, the way the operations did when they held the connection themselves. Every caller that learns to collect its answer later stops calling this.
Sourcepub fn wait(&mut self) -> Result<Done>
pub fn wait(&mut self) -> Result<Done>
Wait for the job in flight. The session uses this to settle what it started before asking for something else: one connection, one conversation.
Sourcepub fn take_backfill(&mut self) -> Vec<u32>
pub fn take_backfill(&mut self) -> Vec<u32>
The backfill takes the UIDs the open left over; they are only handed out once.