Enum bastion::supervisor::SupervisionStrategy[][src]

pub enum SupervisionStrategy {
    OneForOne,
    OneForAll,
    RestForOne,
}

The strategy a supervisor should use when one of its supervised children groups or supervisors dies (in the case of a children group, it could be because one of its elements panicked or returned an error).

The default strategy is OneForOne.

Variants

OneForOne

When a children group dies (either because it got killed, it panicked or returned an error), only this group is restarted.

OneForAll

When a children group dies (either because it got killed, it panicked or returned an error), all the children groups are restarted (even those which were stopped) in the same order they were added to the supervisor.

RestForOne

When a children group dies (either because it got killed, it panicked or returned an error), this group and all the ones that were added to the supervisor after it are restarted (even those which were stopped) in the same order they were added to the supervisor.

Trait Implementations

impl Clone for SupervisionStrategy[src]

impl Debug for SupervisionStrategy[src]

impl Default for SupervisionStrategy[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsAny for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Message for T where
    T: Any + Send + Sync + Debug
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> State for T where
    T: Send + Sync + 'static, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,