Trait apalis_core::worker::Actor

source ·
pub trait Actor: Send + Sized + 'static {
    fn mailbox_capacity(&self) -> usize { ... }
    fn on_start<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        _ctx: &'life1 mut Context<Self>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
, { ... } fn on_stop<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        _ctx: &'life1 mut Context<Self>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
, { ... } fn preinit(self) -> InitializedActor<Self> { ... } fn preinit_default() -> InitializedActor<Self>
    where
        Self: Default
, { ... } fn start<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Addr<Self>> + Send + 'async_trait>>
    where
        Self: 'async_trait
, { ... } fn start_default<'async_trait>(
    ) -> Pin<Box<dyn Future<Output = Addr<Self>> + Send + 'async_trait>>
    where
        Self: Default + 'async_trait
, { ... } }
Available on crate feature worker only.
Expand description

Actor Trait

Provided Methods§

Capacity of worker queue

At start hook of actor

At stop hook of actor

Initilize actor with its address.

Initialize actor with default values

Starts an actor and returns its address

Starts an actor with default values and returns its address

Implementors§