Trait vin_core::TaskActor

source ·
pub trait TaskActor: Task + TaskAddr {
    // Required method
    fn start<'async_trait, Id>(
        id: Id,
        ctx: Self::Context
    ) -> Pin<Box<dyn Future<Output = StrongAddr<Self>> + Send + 'async_trait>>
       where Id: 'async_trait + Into<ActorId> + Send,
             Self: 'async_trait;
}
Expand description

Actor trait that all generic (non-specialized) actors must implement.

Required Methods§

source

fn start<'async_trait, Id>( id: Id, ctx: Self::Context ) -> Pin<Box<dyn Future<Output = StrongAddr<Self>> + Send + 'async_trait>>where Id: 'async_trait + Into<ActorId> + Send, Self: 'async_trait,

Creates and starts a task actor with the given id (if available) and context.

Implementors§