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
sourceimpl<'de> Deserialize<'de> for KeepAlive
impl<'de> Deserialize<'de> for KeepAlive
sourcefn 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 StructuralEq 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.