pub trait Actor<E, A> where
    A: Affixor + Send + 'static, 
{ fn new<'async_trait>(
    ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
    where
        Self: Sized,
        Self: 'async_trait
; fn entry_affix<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Option<A>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn entry_task<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Task>, Box<dyn Error>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn open_actor<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        app: &'life1 mut App<E>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn close_actor<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        app: &'life1 mut App<E>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

Although it starts a project, the work to do here is not very complicated it is as simple as setting up initial condition and other basic things.

Right here, if entry_affix returns None, then Affix is disabled

Required Methods

create a instance

implementation Affixor happens here when None is returned actor will disable affix customization

method to generate Task when open Actor

preparation before enter Actor

preparation before close Actor

Implementors