pub struct ConnectionLimiter<T: Actor> { /* private fields */ }
Implementations§
Source§impl<T: Actor> ConnectionLimiter<T>
impl<T: Actor> ConnectionLimiter<T>
pub fn new() -> Self
pub fn has_slot(&self) -> bool
pub fn limit(&self) -> &Limit
Sourcepub fn set_limit(&mut self, new_limit: Limit) -> Vec<Address<T>>
pub fn set_limit(&mut self, new_limit: Limit) -> Vec<Address<T>>
Returns list of actors that have to be interrupted.
pub fn acquire(&mut self, address: Address<T>)
pub fn release(&mut self, item: IdOf<T>)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ConnectionLimiter<T>
impl<T> !RefUnwindSafe for ConnectionLimiter<T>
impl<T> Send for ConnectionLimiter<T>
impl<T> Sync for ConnectionLimiter<T>
impl<T> Unpin for ConnectionLimiter<T>where
T: Unpin,
impl<T> !UnwindSafe for ConnectionLimiter<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