Trait theatre::ActorExt[][src]

pub trait ActorExt {
#[must_use]    fn spawn<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Addr<Self>> + Send + 'async_trait>>
    where
        Self: 'static + Actor + Sized,
        Self: 'async_trait
;
#[must_use] fn start<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = (Addr<Self>, ActorHandle)> + Send + 'async_trait>>
    where
        Self: 'static + Actor + Sized,
        Self: 'async_trait
; }

Extensions for Actors. This is blanket impl’d on any type that implements Actor.

Required methods

#[must_use]fn spawn<'async_trait>(
    self
) -> Pin<Box<dyn Future<Output = Addr<Self>> + Send + 'async_trait>> where
    Self: 'static + Actor + Sized,
    Self: 'async_trait, 
[src]

Start a new actor. Return its address and discard the handle

#[must_use]fn start<'async_trait>(
    self
) -> Pin<Box<dyn Future<Output = (Addr<Self>, ActorHandle)> + Send + 'async_trait>> where
    Self: 'static + Actor + Sized,
    Self: 'async_trait, 
[src]

Start a new actor. Return its address and handle.

Loading content...

Implementors

impl<A> ActorExt for A where
    A: Actor
[src]

Loading content...