Struct rust_inbox::client::IdleHandle
[−]
[src]
pub struct IdleHandle<'a, T: Read + Write + 'a> { /* fields omitted */ }
IdleHandle
allows a client to block waiting for changes to the remote mailbox.
The handle blocks using the IMAP IDLE command specificed in RFC 2177.
As long a the handle is active, the mailbox cannot be otherwise accessed.
Methods
impl<'a, T: Read + Write + 'a> IdleHandle<'a, T>
[src]
fn wait(&mut self) -> Result<()>
[src]
Block until the selected mailbox changes.
fn cancel(self)
[src]
Cancel the IDLE handle prematurely.
impl<'a, T: SetReadTimeout + Read + Write + 'a> IdleHandle<'a, T>
[src]
fn set_keepalive(&mut self, interval: Duration)
[src]
Set the keep-alive interval to use when wait_keepalive
is called.
The interval defaults to 29 minutes as dictated by RFC 2177.
fn wait_keepalive(&mut self) -> Result<()>
[src]
Block until the selected mailbox changes.
This method differs from IdleHandle::wait
in that it will periodically refresh the IDLE
connection, to prevent the server from timing out our connection. The keepalive interval is
set to 29 minutes by default, as dictated by RFC 2177, but can be changed using
set_keepalive
.
This is the recommended method to use for waiting.
fn wait_timeout(&mut self, timeout: Duration) -> Result<()>
[src]
Block until the selected mailbox changes, or until the given amount of time has expired.