Enum meio::system::System[][src]

pub enum System {}

Virtual actor that represents the system/environment.

Implementations

impl System[src]

pub fn spawn<A>(actor: A) -> Address<A> where
    A: Actor + StartedBy<Self>, 
[src]

Spawns a standalone Actor that has no Supervisor.

pub async fn spawn_and_wait<A>(actor: A) where
    A: Actor + StartedBy<Self> + InterruptedBy<Self>, 
[src]

Spawns an Actor and wait for its termination (normally or by SIGINT interruption).

pub async fn wait_or_interrupt<A>(address: Address<A>) -> Result<(), Error> where
    A: Actor + InterruptedBy<Self>, 
[src]

Waits either Actor interrupted or terminated. If user sends SIGINT signal than the Actor will receive InterruptedBy<System> event, but for the second signal the function just returned to let the app terminate without waiting for any active task.

pub fn interrupt<A>(address: &Address<A>) -> Result<(), Error> where
    A: Actor + InterruptedBy<Self>, 
[src]

Interrupts an Actor.

Trait Implementations

impl Actor for System[src]

type GroupBy = ()

Specifies how to group child actors.

impl<T: Actor> Eliminated<T> for System[src]

Auto Trait Implementations

impl RefUnwindSafe for System

impl Send for System

impl Sync for System

impl Unpin for System

impl UnwindSafe for System

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, 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.