imap::extensions::idle

Trait SetReadTimeout

Source
pub trait SetReadTimeout {
    // Required method
    fn set_read_timeout(&mut self, timeout: Option<Duration>) -> Result<()>;
}
Expand description

Must be implemented for a transport in order for a Session using that transport to support operations with timeouts.

Examples of where this is useful is for Handle::wait_keepalive and Handle::wait_timeout.

Required Methods§

Source

fn set_read_timeout(&mut self, timeout: Option<Duration>) -> Result<()>

Set the timeout for subsequent reads to the given one.

If timeout is None, the read timeout should be removed.

See also std::net::TcpStream::set_read_timeout.

Implementations on Foreign Types§

Source§

impl<'a> SetReadTimeout for TlsStream<TcpStream>

Source§

fn set_read_timeout(&mut self, timeout: Option<Duration>) -> Result<()>

Source§

impl<'a> SetReadTimeout for TcpStream

Source§

fn set_read_timeout(&mut self, timeout: Option<Duration>) -> Result<()>

Implementors§