pub trait Actor<S>: Sized + Sendwhere
S: Send,{
type Data: Send + 'static;
type Channel: Channel;
const VERSION: usize = 1usize;
fn init<'life0, 'life1, 'async_trait>(
&'life0 mut self,
rt: &'life1 mut Rt<Self, S>
) -> Pin<Box<dyn Future<Output = ActorResult<Self::Data>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn run<'life0, 'life1, 'async_trait>(
&'life0 mut self,
rt: &'life1 mut Rt<Self, S>,
data: Self::Data
) -> Pin<Box<dyn Future<Output = ActorResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn type_name() -> &'static str { ... }
}
Expand description
The all-important Actor trait. This defines an Actor and what it do.