[][src]Enum bastion::supervisor::ActorRestartStrategy

pub enum ActorRestartStrategy {
    Immediate,
    LinearBackOff {
        timeout: Duration,
    },
    ExponentialBackOff {
        timeout: Duration,
        multiplier: u64,
    },
}

The strategy for restating an actor as far as it returned an failure.

The default strategy is Immediate.

Variants

Immediate

Restart an actor as soon as possible, since the moment the actor finished with a failure.

LinearBackOff

Restart an actor after with the timeout. Each next restart is increasing on the given duration.

Fields of LinearBackOff

timeout: Duration

An initial delay before the restarting an actor.

ExponentialBackOff

Restart an actor after with the timeout. Each next timeout is increasing exponentially. When passed a multiplier that equals to 1, the strategy works as the linear back off strategy. Passing the multiplier that equals to 0 leads to constant restart delays which is equal to the given timeout.

Fields of ExponentialBackOff

timeout: Duration

An initial delay before the restarting an actor.

multiplier: u64

Defines a multiplier how fast the timeout will be increasing.

Trait Implementations

impl Clone for ActorRestartStrategy[src]

impl Debug for ActorRestartStrategy[src]

impl Default for ActorRestartStrategy[src]

impl Eq for ActorRestartStrategy[src]

impl PartialEq<ActorRestartStrategy> for ActorRestartStrategy[src]

impl StructuralEq for ActorRestartStrategy[src]

impl StructuralPartialEq for ActorRestartStrategy[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, U> Into<U> for T where
    U: From<T>, 
[src]

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

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>,