Struct iron::Timeouts [] [src]

pub struct Timeouts {
    pub keep_alive: Option<Duration>,
    pub read: Option<Duration>,
    pub write: Option<Duration>,

A settings struct containing a set of timeouts which can be applied to a server.


Controls the timeout for keep alive connections.

The default is Some(Duration::from_secs(5)).

NOTE: Setting this to None will have the effect of turning off keep alive.

Controls the timeout for reads on existing connections.

The default is Some(Duration::from_secs(30))

Controls the timeout for writes on existing connections.

The default is Some(Duration::from_secs(1))

Trait Implementations

impl Debug for Timeouts

Formats the value using the given formatter.

impl PartialEq for Timeouts

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Timeouts

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Timeouts

impl Default for Timeouts

Returns the "default value" for a type. Read more