pub struct ImapMailboxWatchStreamOptions {
pub shutdown_poll: Duration,
pub idle_timeout: Option<Duration>,
pub poll: Option<Duration>,
}client only.Expand description
Options of ImapClientStd::watch_mailbox.
Fields§
§shutdown_poll: DurationHow long the worker may sit in a read before it looks at the shutdown flag again.
It is the read deadline armed on the stream, so it is also the
worst case for ImapMailboxWatchStream::close against a
silent server: the worker is blocked in a read until then. A
caller that wants a prompt Ctrl+C picks a second or less and
pays a wakeup per interval; the default of five seconds suits a
long-running watch nobody is waiting on.
idle_timeout: Option<Duration>How long an IDLE is held before it is re-issued, None taking
io-imap’s own default. Ignored when poll selects the polling
watch, which holds no IDLE.
poll: Option<Duration>Re-read the mailbox on this interval instead of holding IDLE.
None, the default, holds IDLE and lets the server speak
first, which is what a server offering it deserves. A value
picks the polling watch and sets how long it waits between two
re-reads, for a server whose IDLE cannot be trusted.
Trait Implementations§
Source§impl Clone for ImapMailboxWatchStreamOptions
impl Clone for ImapMailboxWatchStreamOptions
Source§fn clone(&self) -> ImapMailboxWatchStreamOptions
fn clone(&self) -> ImapMailboxWatchStreamOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more