Trait theatre::Actor [−][src]
Actor is one of the core traits of theatre.
To create an actor just implement the trait for your struct
Example:
use theatre::prelude::*; struct MyActor; impl Actor for MyActor {}
Actor has methods that can be optionally overriden to track actor lifecycle.
The actor’s event loop is shutdown when all addresses to the actor are dropped.
Provided methods
#[must_use]fn starting<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
_ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn stopping<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
_ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
#[must_use]fn stopped<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
_ctx: &'life1 mut Context<Self>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,