pub trait Actor<S>: Sized + Sendwhere
S: Send,{
type Data: Send + 'static;
type Channel: Channel;
const VERSION: usize = 1usize;
// Required methods
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: '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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn type_name() -> &'static str { ... }
}
Expand description
The all-important Actor trait. This defines an Actor and what it do.
Provided Associated Constants§
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.