pub enum RestartPolicy {
Never,
Limited {
max_restarts: u32,
within: Duration,
},
Always,
}Expand description
supervised actor の再起動方針。無制限 restart は暴走ループになりうるので、既定は上限つき。
Variants§
Never
再起動しない(パニックしたら停止・切り離し)。
Limited
within の窓の中で max_restarts 回まで再起動。超えたら停止。
Always
無制限に再起動(暴走 restart-loop に注意)。
Implementations§
Source§impl RestartPolicy
impl RestartPolicy
Sourcepub fn default_supervised() -> Self
pub fn default_supervised() -> Self
.supervised() の既定。BusySpin コアで暴れないよう控えめ(5 回 / 10 秒)。
Trait Implementations§
Source§impl Clone for RestartPolicy
impl Clone for RestartPolicy
Source§fn clone(&self) -> RestartPolicy
fn clone(&self) -> RestartPolicy
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 RestartPolicy
Auto Trait Implementations§
impl Freeze for RestartPolicy
impl RefUnwindSafe for RestartPolicy
impl Send for RestartPolicy
impl Sync for RestartPolicy
impl Unpin for RestartPolicy
impl UnsafeUnpin for RestartPolicy
impl UnwindSafe for RestartPolicy
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