Trait theatre::actors::supervisor::Supervised [−][src]
In order for an Supervisor to supervise an actor, an actor needs to implement this trait to provide new instances of the actor if it stops for whatever reason.
Required methods
#[must_use]fn new<'life0, 'async_trait>(
context: &'life0 mut Context<Self>
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
Self: 'async_trait,
[src]
context: &'life0 mut Context<Self>
) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>> where
Self: Sized,
'life0: 'async_trait,
Self: 'async_trait,
Construct a new instance of the actor
Provided methods
#[must_use]fn restarting<'life0, 'async_trait>(
reason: ActorStopReason,
ctx: &'life0 mut Context<Self>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
Self: Sized + Supervised,
'life0: 'async_trait,
Self: Send + 'async_trait,
[src]
reason: ActorStopReason,
ctx: &'life0 mut Context<Self>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
Self: Sized + Supervised,
'life0: 'async_trait,
Self: Send + 'async_trait,
This method is called whenever the actor has shutdown and the supervisor has begun to restart the actor with a new context