pub struct SupervisorConfig {
pub max_restarts: u32,
pub max_period: Duration,
pub strategy: RestartStrategy,
}Expand description
Tunables for Supervisor::with_config.
Fields§
§max_restarts: u32Restart waves allowed inside Self::max_period. The initial
start does not count. Hitting this cap sets
Supervisor::intensity_exceeded and further waves are refused.
One unexpected exit → one wave, even if the strategy respawns several
siblings (OneForAll / RestForOne). This matches OTP intensity
(restart decisions), not a raw spawn counter.
max_period: Duration§strategy: RestartStrategyTrait Implementations§
Source§impl Clone for SupervisorConfig
impl Clone for SupervisorConfig
Source§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