[][src]Struct spirit_tokio::net::limits::WithListenLimits

#[non_exhaustive]pub struct WithListenLimits<A, L> {
    pub listen: A,
    pub limits: L,
}

A wrapper around a listening socket Fragment that adds limits and error handling to it.

There's also the convenience type alias WithLimits.

Note that the applied limits are per-instance. If there are two sockets in eg Vec<TcpListenWithLimits>, their limits are independent. In addition, if a configuration of a socket changes, the old listening socket is destroyed but the old connections are kept around until they terminate. The new listening socket starts with fresh limits, not counting the old connections.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
listen: A

The inner listener socket.

This is available publicly to allow reading the extra configuration out of it.

limits: L

Limits applied to the listener.

Trait Implementations

impl<A: Clone, L: Clone> Clone for WithListenLimits<A, L>[src]

impl<A, L> Comparable<WithListenLimits<A, L>> for WithListenLimits<A, L> where
    A: Comparable,
    L: PartialEq
[src]

impl<A: Debug, L: Debug> Debug for WithListenLimits<A, L>[src]

impl<A: Default, L: Default> Default for WithListenLimits<A, L>[src]

impl<'de, A, L> Deserialize<'de> for WithListenLimits<A, L> where
    A: Deserialize<'de>,
    L: Deserialize<'de>, 
[src]

impl<A: Eq, L: Eq> Eq for WithListenLimits<A, L>[src]

impl<A, L> Fragment for WithListenLimits<A, L> where
    A: Clone + Debug + Fragment + Comparable,
    L: Clone + Debug + ListenLimits + PartialEq
[src]

type Driver = CacheSimilar<Self>

The default driver to be used by the fragment. Read more

type Installer = ()

The default installer to be used unless a transformation or the user doesn't provide one. Read more

type Seed = A::Seed

The intermediate product if the fragment supports two-stage creation of Resources. If not, it can be set to (). Read more

type Resource = Limited<A::Resource>

The actual product this Fragment creates.

impl<A: Hash, L: Hash> Hash for WithListenLimits<A, L>[src]

impl<A: Ord, L: Ord> Ord for WithListenLimits<A, L>[src]

impl<A: PartialEq, L: PartialEq> PartialEq<WithListenLimits<A, L>> for WithListenLimits<A, L>[src]

impl<A: PartialOrd, L: PartialOrd> PartialOrd<WithListenLimits<A, L>> for WithListenLimits<A, L>[src]

impl<A, L> Serialize for WithListenLimits<A, L> where
    A: Serialize,
    L: Serialize
[src]

impl<A, L> Stackable for WithListenLimits<A, L> where
    A: Stackable
[src]

impl<A, L> StructDoc for WithListenLimits<A, L> where
    A: StructDoc,
    L: StructDoc
[src]

impl<A, L> StructuralEq for WithListenLimits<A, L>[src]

impl<A, L> StructuralPartialEq for WithListenLimits<A, L>[src]

Auto Trait Implementations

impl<A, L> RefUnwindSafe for WithListenLimits<A, L> where
    A: RefUnwindSafe,
    L: RefUnwindSafe

impl<A, L> Send for WithListenLimits<A, L> where
    A: Send,
    L: Send

impl<A, L> Sync for WithListenLimits<A, L> where
    A: Sync,
    L: Sync

impl<A, L> Unpin for WithListenLimits<A, L> where
    A: Unpin,
    L: Unpin

impl<A, L> UnwindSafe for WithListenLimits<A, L> where
    A: UnwindSafe,
    L: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoResult<T> for T[src]

impl<F> Optional for F where
    F: Stackable
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.