[][src]Trait actix::Supervised

pub trait Supervised: Actor {
    fn restarting(&mut self, ctx: &mut Self::Context) { ... }
}

Actors with the ability to restart after failure.

Supervised actors can be managed by a Supervisor. As an additional lifecycle event, the restarting method can be implemented.

If a supervised actor fails, its supervisor creates new execution context and restarts the actor, invoking its restarting method. After a call to this method, the actor's execution state changes to Started and the regular lifecycle process starts.

The restarting method gets called with the newly constructed Context object.

Provided methods

fn restarting(&mut self, ctx: &mut Self::Context)

Called when the supervisor restarts a failed actor.

Loading content...

Implementors

impl Supervised for Resolver[src]

fn restarting(&mut self, ctx: &mut Self::Context)[src]

impl<T> Supervised for Mocker<T>[src]

fn restarting(&mut self, ctx: &mut Self::Context)[src]

Loading content...