pub struct ConnLimiter<T> { /* private fields */ }Expand description
Return type of ListenerExt::limit_connections.
See that method for details.
Trait Implementations§
Source§impl<T: Debug> Debug for ConnLimiter<T>
impl<T: Debug> Debug for ConnLimiter<T>
Auto Trait Implementations§
impl<T> Freeze for ConnLimiter<T>where
T: Freeze,
impl<T> !RefUnwindSafe for ConnLimiter<T>
impl<T> Send for ConnLimiter<T>where
T: Send,
impl<T> Sync for ConnLimiter<T>where
T: Sync,
impl<T> Unpin for ConnLimiter<T>where
T: Unpin,
impl<T> !UnwindSafe for ConnLimiter<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.
Source§impl<L> ListenerExt for Lwhere
L: Listener,
impl<L> ListenerExt for Lwhere
L: Listener,
Source§fn limit_connections(self, limit: usize) -> ConnLimiter<Self>
fn limit_connections(self, limit: usize) -> ConnLimiter<Self>
Limit the number of concurrent connections. Once the limit has
been reached, no additional connections will be accepted until
an existing connection is closed. Listener implementations will
typically continue to queue incoming connections, up to an OS
and implementation-specific listener backlog limit. Read more