[−][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
listener: Listener
The inner listener socket.
This is available publicly to allow reading the extra configuration out of it.
Trait Implementations
impl<Listener: Clone, Limits: Clone> Clone for WithListenLimits<Listener, Limits>
[src]
fn clone(&self) -> WithListenLimits<Listener, Limits>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Listener: Default, Limits: Default> Default for WithListenLimits<Listener, Limits>
[src]
fn default() -> WithListenLimits<Listener, Limits>
[src]
impl<Listener: Eq, Limits: Eq> Eq for WithListenLimits<Listener, Limits>
[src]
impl<Listener: Ord, Limits: Ord> Ord for WithListenLimits<Listener, Limits>
[src]
fn cmp(&self, other: &WithListenLimits<Listener, Limits>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<Listener: PartialEq, Limits: PartialEq> PartialEq<WithListenLimits<Listener, Limits>> for WithListenLimits<Listener, Limits>
[src]
fn eq(&self, other: &WithListenLimits<Listener, Limits>) -> bool
[src]
fn ne(&self, other: &WithListenLimits<Listener, Limits>) -> bool
[src]
impl<Listener: PartialOrd, Limits: PartialOrd> PartialOrd<WithListenLimits<Listener, Limits>> for WithListenLimits<Listener, Limits>
[src]
fn partial_cmp(
&self,
other: &WithListenLimits<Listener, Limits>
) -> Option<Ordering>
[src]
&self,
other: &WithListenLimits<Listener, Limits>
) -> Option<Ordering>
fn lt(&self, other: &WithListenLimits<Listener, Limits>) -> bool
[src]
fn le(&self, other: &WithListenLimits<Listener, Limits>) -> bool
[src]
fn gt(&self, other: &WithListenLimits<Listener, Limits>) -> bool
[src]
fn ge(&self, other: &WithListenLimits<Listener, Limits>) -> bool
[src]
impl<Listener: Debug, Limits: Debug> Debug for WithListenLimits<Listener, Limits>
[src]
impl<Listener: Hash, Limits: Hash> Hash for WithListenLimits<Listener, 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<Listener, Limits> Serialize for WithListenLimits<Listener, Limits> where
Listener: Serialize,
Limits: Serialize,
[src]
Listener: Serialize,
Limits: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de, Listener, Limits> Deserialize<'de> for WithListenLimits<Listener, Limits> where
Listener: Deserialize<'de>,
Limits: Deserialize<'de>,
[src]
Listener: Deserialize<'de>,
Limits: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<Listener, Limits> Comparable<WithListenLimits<Listener, Limits>> for WithListenLimits<Listener, Limits> where
Listener: Comparable,
Limits: PartialEq,
[src]
Listener: Comparable,
Limits: PartialEq,
fn compare(&self, other: &Self) -> Comparison
[src]
impl<Listener, Limits> Fragment for WithListenLimits<Listener, Limits> where
Listener: Clone + Debug + Fragment + Comparable,
Limits: Clone + Debug + ListenLimits + PartialEq,
[src]
Listener: Clone + Debug + Fragment + Comparable,
Limits: 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 = Listener::Seed
The intermediate product if the fragment supports two-stage creation of [Resource
][Fragment::Resource]s. If not, it can be set to ()
. Read more
type Resource = LimitedListener<Listener::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<Listener, Limits> Stackable for WithListenLimits<Listener, Limits> where
Listener: Stackable,
[src]
Listener: Stackable,
impl<Listener, Limits> StructDoc for WithListenLimits<Listener, Limits> where
Listener: StructDoc,
Limits: StructDoc,
[src]
Listener: StructDoc,
Limits: StructDoc,
fn document() -> Documentation
[src]
Auto Trait Implementations
impl<Listener, Limits> Send for WithListenLimits<Listener, Limits> where
Limits: Send,
Listener: Send,
Limits: Send,
Listener: Send,
impl<Listener, Limits> Sync for WithListenLimits<Listener, Limits> where
Limits: Sync,
Listener: Sync,
Limits: Sync,
Listener: Sync,
impl<Listener, Limits> Unpin for WithListenLimits<Listener, Limits> where
Limits: Unpin,
Listener: Unpin,
Limits: Unpin,
Listener: Unpin,
impl<Listener, Limits> UnwindSafe for WithListenLimits<Listener, Limits> where
Limits: UnwindSafe,
Listener: UnwindSafe,
Limits: UnwindSafe,
Listener: UnwindSafe,
impl<Listener, Limits> RefUnwindSafe for WithListenLimits<Listener, Limits> where
Limits: RefUnwindSafe,
Listener: RefUnwindSafe,
Limits: RefUnwindSafe,
Listener: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> IntoResult<T> for T
[src]
impl<F> Optional for F where
F: Stackable,
[src]
F: Stackable,