pub struct Timeouts {
pub keep_alive: Option<Duration>,
pub read: Option<Duration>,
pub write: Option<Duration>,
}
Expand description
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 connections.
The default is Some(Duration::from_secs(1))
Trait Implementations§
impl Copy for Timeouts
impl StructuralPartialEq for Timeouts
Auto Trait Implementations§
impl Freeze for Timeouts
impl RefUnwindSafe for Timeouts
impl Send for Timeouts
impl Sync for Timeouts
impl Unpin for Timeouts
impl UnwindSafe for Timeouts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more