pub enum KeepAlive {
Default,
Disabled,
Os,
Seconds(usize),
}
Expand description
The server keep-alive preference.
By default keep alive is set to 5 seconds. Takes a string value: Either “default”, “disabled”, “os”, or a string of the format “N seconds” where N is an integer > 0 e.g. “6 seconds”.
Variants§
Default
The default keep-alive as defined by Actix Web.
Disabled
Disable keep-alive.
Os
Let the OS determine keep-alive duration.
Note: this is usually quite long.
Seconds(usize)
A specific keep-alive duration (in seconds).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeepAlive
impl<'de> Deserialize<'de> for KeepAlive
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KeepAlive
impl StructuralPartialEq for KeepAlive
Auto Trait Implementations§
impl Freeze for KeepAlive
impl RefUnwindSafe for KeepAlive
impl Send for KeepAlive
impl Sync for KeepAlive
impl Unpin for KeepAlive
impl UnwindSafe for KeepAlive
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