pub trait AddrSignalExt {
    fn stop(&self);
fn terminate(&self); }
Expand description

An extension trait for Addrs that provides convenient methods to control associated actors’ lifecycle.

The actor must implement the SignalHandler trait for these methods to work.

Delayed operation

These methods are different from their context counterparts which have immediate effects. Instead, they are queued to the mailbox, subjecting to message sending and handling delays. Moreover, if the actor stops/terminates/panics before handling the signal, no actual operation will be performed.

Signal convention

There’s no guarantee how the actor may react to signals. A misbehaved actor may act completely different from your intention.

See signals module for details.

Required methods

Stop the actor associated with the address.

This method should have the same effect as ActorContext::stop.

Terminate the actor associated with the address.

This method should have the same effect as ActorContext::terminate.

Implementations on Foreign Types

Implementors