pub struct Registry {
pub limits: Limits,
/* private fields */
}Expand description
The connections alive, and the bytes of long lines they hold.
Fields§
§limits: LimitsImplementations§
Source§impl Registry
impl Registry
pub fn new(limits: Limits) -> Arc<Self> ⓘ
Sourcepub fn admit(
self: &Arc<Self>,
uid: u32,
stream: Arc<UnixStream>,
) -> Option<(Slot, bool)>
pub fn admit( self: &Arc<Self>, uid: u32, stream: Arc<UnixStream>, ) -> Option<(Slot, bool)>
A place for a new connection. When there is none the connection that
has been quiet longest gives up its own, so connections that do
nothing can not keep a client out; None when all of them are at
work. The second value says whether one was evicted.
Auto Trait Implementations§
impl !Freeze for Registry
impl Forget for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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
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 more