[][src]Struct acteur::Acteur

pub struct Acteur { /* fields omitted */ }

Acteur is the main inteface to the actor runtime. It allows sending messages, stopping the runtime, set configurations, etc. Once contructed with the method "new" you can start sending messages. The system will automatically start any required actor and unload them when not used.

Methods

impl Acteur[src]

pub fn new() -> Acteur[src]

Initializes the system. After this, you can send messages using the send method.

pub async fn send<'_, A: Actor + Handle<M>, M: Debug + Send + 'static>(
    &'_ self,
    actor_id: A::Id,
    message: M
)
[src]

Sends a message to an actor with an ID. If the actor is not loaded in Ram, this method will load them first by calling their "activate" method.

pub fn send_sync<A: Actor + Handle<M>, M: Debug + Send + 'static>(
    &self,
    actor_id: A::Id,
    message: M
)
[src]

Same as send method, but sync version.

pub fn stop(&self)[src]

Send an stop message to all actors in the system. Actors will process all the enqued messages before stop

pub fn wait_until_stopped(&self)[src]

Waits until all actors are stopped. If you call "system.stop()" this method will wait untill all actor have consumed all messages before returning.

pub fn get_statistics(&self) -> Vec<(TypeId, Vec<ActorReport>)>[src]

Trait Implementations

impl Clone for Acteur[src]

impl Debug for Acteur[src]

impl Default for Acteur[src]

Auto Trait Implementations

impl !RefUnwindSafe for Acteur

impl Send for Acteur

impl Sync for Acteur

impl Unpin for Acteur

impl !UnwindSafe for Acteur

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,