pub struct SupervisorConfig {
pub max_restarts: u32,
pub max_period: Duration,
}Expand description
Tunables for Supervisor::with_config.
Unlike a full OTP supervisor this does not implement one-for-all /
rest-for-one: those strategies require aborting sibling processes, and
Byteflow’s preemption is cooperative (see super::runtime::Runtime::shutdown).
v0 is one-for-one — only the child that exited is considered for restart.
Fields§
§max_restarts: u32Restarts allowed inside Self::max_period. The initial start does
not count; only respawns do. Hitting this cap sets
Supervisor::intensity_exceeded and further restarts are refused.
max_period: DurationTrait Implementations§
Source§impl Clone for SupervisorConfig
impl Clone for SupervisorConfig
Source§fn clone(&self) -> SupervisorConfig
fn clone(&self) -> SupervisorConfig
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 moreSource§impl Debug for SupervisorConfig
impl Debug for SupervisorConfig
Auto Trait Implementations§
impl Freeze for SupervisorConfig
impl RefUnwindSafe for SupervisorConfig
impl Send for SupervisorConfig
impl Sync for SupervisorConfig
impl Unpin for SupervisorConfig
impl UnsafeUnpin for SupervisorConfig
impl UnwindSafe for SupervisorConfig
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