Struct tonari_actor::SystemHandle
source · pub struct SystemHandle { /* private fields */ }
Expand description
Contains the “metadata” of the system, including information about the registry of actors currently existing within the system.
Implementations§
source§impl SystemHandle
impl SystemHandle
sourcepub fn shutdown(&self) -> Result<(), ActorError>
pub fn shutdown(&self) -> Result<(), ActorError>
Stops all actors spawned by this system.
sourcepub fn subscribe_recipient<M: 'static, E: Event + Into<M>>(
&self,
recipient: Recipient<M>
)
pub fn subscribe_recipient<M: 'static, E: Event + Into<M>>( &self, recipient: Recipient<M> )
Subscribe given recipient
to events of type E
. See Context::subscribe()
.
pub fn is_running(&self) -> bool
Trait Implementations§
source§impl Clone for SystemHandle
impl Clone for SystemHandle
source§fn clone(&self) -> SystemHandle
fn clone(&self) -> SystemHandle
Returns a copy 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 Default for SystemHandle
impl Default for SystemHandle
source§fn default() -> SystemHandle
fn default() -> SystemHandle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SystemHandle
impl !RefUnwindSafe for SystemHandle
impl Send for SystemHandle
impl Sync for SystemHandle
impl Unpin for SystemHandle
impl !UnwindSafe for SystemHandle
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