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.

Fields

keep_alive: Option<Duration>

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.

read: Option<Duration>

Controls the timeout for reads on existing connections.

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

write: Option<Duration>

Controls the timeout for writes on existing conncetions.

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

Trait Implementations

impl Copy for Timeouts
[src]

impl Clone for Timeouts
[src]

fn clone(&self) -> Timeouts

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl PartialEq for Timeouts
[src]

fn eq(&self, __arg_0: &Timeouts) -> bool

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

fn ne(&self, __arg_0: &Timeouts) -> bool

This method tests for !=.

impl Debug for Timeouts
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Default for Timeouts
[src]

fn default() -> Self

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