pub struct ActorRegistry { /* private fields */ }Expand description
Thread-safe registry of all live actors.
Implementations§
Source§impl ActorRegistry
impl ActorRegistry
pub fn new() -> Self
Sourcepub async fn register(&self, entry: ActorEntry)
pub async fn register(&self, entry: ActorEntry)
Register a new actor entry.
Sourcepub async fn deregister(&self, id: &str)
pub async fn deregister(&self, id: &str)
Deregister an actor by WID.
Sourcepub async fn get(&self, id: &str) -> Option<ActorEntry>
pub async fn get(&self, id: &str) -> Option<ActorEntry>
Look up an actor entry by WID.
Sourcepub async fn get_by_name(&self, name: &str) -> Option<ActorEntry>
pub async fn get_by_name(&self, name: &str) -> Option<ActorEntry>
Look up an actor by name.
Sourcepub async fn list(&self) -> Vec<ActorEntry>
pub async fn list(&self) -> Vec<ActorEntry>
Return a snapshot of all registered actors.
Sourcepub async fn update_state(&self, id: &str, state: ActorState)
pub async fn update_state(&self, id: &str, state: ActorState)
Update the stored ActorState for an actor.
Trait Implementations§
Source§impl Clone for ActorRegistry
impl Clone for ActorRegistry
Source§fn clone(&self) -> ActorRegistry
fn clone(&self) -> ActorRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActorRegistry
impl Debug for ActorRegistry
Source§impl Default for ActorRegistry
impl Default for ActorRegistry
Source§fn default() -> ActorRegistry
fn default() -> ActorRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ActorRegistry
impl !RefUnwindSafe for ActorRegistry
impl Send for ActorRegistry
impl Sync for ActorRegistry
impl Unpin for ActorRegistry
impl !UnwindSafe for ActorRegistry
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