[−][src]Struct spirit_tokio::net::limits::WithListenLimits
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)
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]
fn clone(&self) -> WithListenLimits<A, L>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<A, L> Comparable<WithListenLimits<A, L>> for WithListenLimits<A, L> where
A: Comparable,
L: PartialEq,
[src]
A: Comparable,
L: PartialEq,
fn compare(&self, other: &Self) -> Comparison
[src]
impl<A: Debug, L: Debug> Debug for WithListenLimits<A, L>
[src]
impl<A: Default, L: Default> Default for WithListenLimits<A, L>
[src]
fn default() -> WithListenLimits<A, L>
[src]
impl<'de, A, L> Deserialize<'de> for WithListenLimits<A, L> where
A: Deserialize<'de>,
L: Deserialize<'de>,
[src]
A: Deserialize<'de>,
L: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
A: Clone + Debug + Fragment + Comparable,
L: Clone + Debug + ListenLimits + PartialEq,
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
Resource
s. If not, it can be set to ()
. Read more
type Resource = Limited<A::Resource>
The actual product this Fragment
creates.
const RUN_BEFORE_CONFIG: bool
[src]
fn make_seed(&self, name: &'static str) -> Result<Self::Seed, AnyError>
[src]
fn make_resource(
&self,
seed: &mut Self::Seed,
name: &'static str
) -> Result<Self::Resource, AnyError>
[src]
&self,
seed: &mut Self::Seed,
name: &'static str
) -> Result<Self::Resource, AnyError>
fn init<B: Extensible<Ok = B>>(
builder: B,
name: &'static str
) -> Result<B, AnyError> where
B::Config: DeserializeOwned + Send + Sync + 'static,
B::Opts: StructOpt + Send + Sync + 'static,
[src]
builder: B,
name: &'static str
) -> Result<B, AnyError> where
B::Config: DeserializeOwned + Send + Sync + 'static,
B::Opts: StructOpt + Send + Sync + 'static,
fn create(
&self,
name: &'static str
) -> Result<Self::Resource, Box<dyn Error + 'static + Sync + Send>>
[src]
&self,
name: &'static str
) -> Result<Self::Resource, Box<dyn Error + 'static + Sync + Send>>
impl<A: Hash, L: Hash> Hash for WithListenLimits<A, L>
[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<A: Ord, L: Ord> Ord for WithListenLimits<A, L>
[src]
fn cmp(&self, other: &WithListenLimits<A, L>) -> 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<A: PartialEq, L: PartialEq> PartialEq<WithListenLimits<A, L>> for WithListenLimits<A, L>
[src]
fn eq(&self, other: &WithListenLimits<A, L>) -> bool
[src]
fn ne(&self, other: &WithListenLimits<A, L>) -> bool
[src]
impl<A: PartialOrd, L: PartialOrd> PartialOrd<WithListenLimits<A, L>> for WithListenLimits<A, L>
[src]
fn partial_cmp(&self, other: &WithListenLimits<A, L>) -> Option<Ordering>
[src]
fn lt(&self, other: &WithListenLimits<A, L>) -> bool
[src]
fn le(&self, other: &WithListenLimits<A, L>) -> bool
[src]
fn gt(&self, other: &WithListenLimits<A, L>) -> bool
[src]
fn ge(&self, other: &WithListenLimits<A, L>) -> bool
[src]
impl<A, L> Serialize for WithListenLimits<A, L> where
A: Serialize,
L: Serialize,
[src]
A: Serialize,
L: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<A, L> Stackable for WithListenLimits<A, L> where
A: Stackable,
[src]
A: Stackable,
impl<A, L> StructDoc for WithListenLimits<A, L> where
A: StructDoc,
L: StructDoc,
[src]
A: StructDoc,
L: StructDoc,
fn document() -> Documentation
[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,
A: RefUnwindSafe,
L: RefUnwindSafe,
impl<A, L> Send for WithListenLimits<A, L> where
A: Send,
L: Send,
A: Send,
L: Send,
impl<A, L> Sync for WithListenLimits<A, L> where
A: Sync,
L: Sync,
A: Sync,
L: Sync,
impl<A, L> Unpin for WithListenLimits<A, L> where
A: Unpin,
L: Unpin,
A: Unpin,
L: Unpin,
impl<A, L> UnwindSafe for WithListenLimits<A, L> where
A: UnwindSafe,
L: UnwindSafe,
A: UnwindSafe,
L: UnwindSafe,
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<F> Optional for F where
F: Stackable,
[src]
F: Stackable,
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>,