[−][src]Struct spirit_tokio::net::limits::Limits
An implementation of ListenLimits
that reads the limits from configuration.
Fields
error-sleep
: The back-off time when non-fatal error happens, in human readable form. Defaults to100ms
if not present.max-conn
: Maximum number of parallel connections on this listener. Defaults to no limit (well, tousize::max_value() / 8 - 1
, actually, for technical reasons, but that should be effectively no limit).
Fields (Non-exhaustive)
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.error_sleep: Duration
How long to wait before trying again after an error.
Some errors when accepting are simply ignored (eg. the connection was closed by the other side before we had time to accept it). Some others (eg. too many open files) put the acceptor into a sleep before it tries again, in the hope the situation will have improved by then.
Defaults to 100ms
if not set.
max_conn: Option<usize>
Maximum number of connections per one listener.
If it is reached, more connections will not be accepted until some of the old ones are terminated.
Defaults to implementation limits if not set (2^31 - 1 on 32bit systems, 2^63 - 1 on 64bit systems), which is likely higher than what the OS can effectively handle ‒ so you can assume that if not set, there's no limit.
Trait Implementations
impl Clone for Limits
[src]
impl Debug for Limits
[src]
impl Default for Limits
[src]
impl<'de> Deserialize<'de> for Limits
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Limits
[src]
impl Hash for Limits
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl ListenLimits for Limits
[src]
impl Ord for Limits
[src]
fn cmp(&self, other: &Limits) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Limits> for Limits
[src]
impl PartialOrd<Limits> for Limits
[src]
fn partial_cmp(&self, other: &Limits) -> Option<Ordering>
[src]
fn lt(&self, other: &Limits) -> bool
[src]
fn le(&self, other: &Limits) -> bool
[src]
fn gt(&self, other: &Limits) -> bool
[src]
fn ge(&self, other: &Limits) -> bool
[src]
impl Serialize for Limits
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructDoc for Limits
[src]
fn document() -> Documentation
[src]
impl StructuralEq for Limits
[src]
impl StructuralPartialEq for Limits
[src]
Auto Trait Implementations
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnwindSafe for Limits
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoResult<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,