pub struct ChannelRestartPolicy {
pub max_restarts: u32,
pub restart: bool,
}Expand description
How a supervised channel actor is restarted after its process dies.
Fields§
§max_restarts: u32Maximum number of restarts permitted before the actor is left dead.
restart: boolWhether a dead actor is restarted at all (one-for-one when true).
Implementations§
Source§impl ChannelRestartPolicy
impl ChannelRestartPolicy
Sourcepub const fn one_for_one(max_restarts: u32) -> Self
pub const fn one_for_one(max_restarts: u32) -> Self
One-for-one restart with a bounded restart budget.
Trait Implementations§
Source§impl Clone for ChannelRestartPolicy
impl Clone for ChannelRestartPolicy
Source§fn clone(&self) -> ChannelRestartPolicy
fn clone(&self) -> ChannelRestartPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ChannelRestartPolicy
Source§impl Debug for ChannelRestartPolicy
impl Debug for ChannelRestartPolicy
Source§impl Default for ChannelRestartPolicy
impl Default for ChannelRestartPolicy
impl Eq for ChannelRestartPolicy
Source§impl PartialEq for ChannelRestartPolicy
impl PartialEq for ChannelRestartPolicy
Source§fn eq(&self, other: &ChannelRestartPolicy) -> bool
fn eq(&self, other: &ChannelRestartPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChannelRestartPolicy
Auto Trait Implementations§
impl Freeze for ChannelRestartPolicy
impl RefUnwindSafe for ChannelRestartPolicy
impl Send for ChannelRestartPolicy
impl Sync for ChannelRestartPolicy
impl Unpin for ChannelRestartPolicy
impl UnsafeUnpin for ChannelRestartPolicy
impl UnwindSafe for ChannelRestartPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.