[][src]Struct imap::extensions::idle::Handle

pub struct Handle<'a, T: Read + Write + 'a> { /* fields omitted */ }

Handle allows a client to block waiting for changes to the remote mailbox.

The handle blocks using the IDLE command specificed in RFC 2177 until the underlying server state changes in some way. While idling does inform the client what changes happened on the server, this implementation will currently just block until anything changes, and then notify the

Note that the server MAY consider a client inactive if it has an IDLE command running, and if such a server has an inactivity timeout it MAY log the client off implicitly at the end of its timeout period. Because of that, clients using IDLE are advised to terminate the IDLE and re-issue it at least every 29 minutes to avoid being logged off. Handle::wait_keepalive does this. This still allows a client to receive immediate mailbox updates even though it need only "poll" at half hour intervals.

As long as a Handle is active, the mailbox cannot be otherwise accessed.

Methods

impl<'a, T: Read + Write + 'a> Handle<'a, T>
[src]

Block until the selected mailbox changes.

impl<'a, T: SetReadTimeout + Read + Write + 'a> Handle<'a, T>
[src]

Set the keep-alive interval to use when wait_keepalive is called.

The interval defaults to 29 minutes as dictated by RFC 2177.

Block until the selected mailbox changes.

This method differs from Handle::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 Handle::set_keepalive.

This is the recommended method to use for waiting.

Block until the selected mailbox changes, or until the given amount of time has expired.

Trait Implementations

impl<'a, T: Read + Write + 'a> Drop for Handle<'a, T>
[src]

impl<'a, T: Debug + Read + Write + 'a> Debug for Handle<'a, T>
[src]

Auto Trait Implementations

impl<'a, T> Send for Handle<'a, T> where
    T: Send

impl<'a, T> !Sync for Handle<'a, T>

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]