pub struct Registry { /* private fields */ }
Expand description
Specifies an entity responsible for providing actors and keeping track of their usage.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn use_actor(&mut self, actor: &Actor) -> bool
pub fn use_actor(&mut self, actor: &Actor) -> bool
Removes an actor from the list of available actors. Returns whether the actor was present in the registry.
Sourcepub fn free_actor(&mut self, actor: &Arc<Actor>) -> bool
pub fn free_actor(&mut self, actor: &Arc<Actor>) -> bool
Adds actor to the list of available actors. Returns whether the actor was not present in the registry.
Sourcepub fn available(&self) -> impl Iterator<Item = Arc<Actor>> + '_
pub fn available(&self) -> impl Iterator<Item = Arc<Actor>> + '_
Returns list of all available actors.
Sourcepub fn next(&self) -> impl Iterator<Item = Arc<Actor>> + '_
pub fn next(&self) -> impl Iterator<Item = Arc<Actor>> + '_
Returns next available actors from each different type.
Sourcepub fn deep_slice(&self, filter: impl Fn(&Actor) -> bool) -> Self
pub fn deep_slice(&self, filter: impl Fn(&Actor) -> bool) -> Self
Creates a deep sliced copy of registry keeping only specific actors.
Auto Trait Implementations§
impl Freeze for Registry
impl !RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin 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