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.

fn name(&self) -> String[src]

Returns unique name of the Actor. Uses Uuid by default. Read more

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

fn handle<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    _id: IdOf<T>,
    _ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Called when the Actor finished.

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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.