Enum actix_settings::KeepAlive
source · 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
source§impl PartialEq for KeepAlive
impl PartialEq for KeepAlive
impl Eq for KeepAlive
impl StructuralPartialEq for KeepAlive
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.