Struct tiny_tokio_actor::ActorSystem [−][src]
pub struct ActorSystem<E: SystemEvent> { /* fields omitted */ }
Implementations
impl<E: SystemEvent> ActorSystem<E>[src]
impl<E: SystemEvent> ActorSystem<E>[src]pub fn publish(&self, event: E)[src]
pub fn publish(&self, event: E)[src]Publish an event on the actor system’s event bus. These events can be received by other actors in the same actor system.
pub fn events(&self) -> BroadcastReceiver<E>[src]
pub fn events(&self) -> BroadcastReceiver<E>[src]Subscribe to events of this actor system.
pub async fn get_actor<A: Actor<E>>(
&self,
path: &ActorPath
) -> Option<ActorRef<E, A>>[src]
pub async fn get_actor<A: Actor<E>>(
&self,
path: &ActorPath
) -> Option<ActorRef<E, A>>[src]Retrieves an actor running in this actor system. If actor does not exist, a None is returned instead.
pub async fn create_actor<A: Actor<E>>(
&self,
name: &str,
actor: A
) -> Result<ActorRef<E, A>, ActorError>[src]
pub async fn create_actor<A: Actor<E>>(
&self,
name: &str,
actor: A
) -> Result<ActorRef<E, A>, ActorError>[src]Launches a new top level actor on this actor system at the ‘/user’ actor path. If another actor with
the same name already exists, an Err(ActorError::Exists(ActorPath)) is returned instead.
pub async fn stop_actor(&self, path: &ActorPath)[src]
pub async fn stop_actor(&self, path: &ActorPath)[src]Stops the actor on this actor system. All its children will also be stopped.
Trait Implementations
impl<E: Clone + SystemEvent> Clone for ActorSystem<E>[src]
impl<E: Clone + SystemEvent> Clone for ActorSystem<E>[src]fn clone(&self) -> ActorSystem<E>[src]
fn clone(&self) -> ActorSystem<E>[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
Auto Trait Implementations
impl<E> !RefUnwindSafe for ActorSystem<E>
impl<E> Send for ActorSystem<E>
impl<E> Sync for ActorSystem<E>
impl<E> Unpin for ActorSystem<E>
impl<E> !UnwindSafe for ActorSystem<E>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more