pub struct SupervisorConfig { /* private fields */ }Expand description
How a child is watched and restarted.
Implementations§
Source§impl SupervisorConfig
impl SupervisorConfig
Sourcepub fn new(restart: RestartPolicy, health: HealthPolicy) -> Self
pub fn new(restart: RestartPolicy, health: HealthPolicy) -> Self
restart decides when and whether a stopped child starts again; health decides when
probe results make a child unhealthy or a start a failure.
Sourcepub fn poll_interval(self, interval: Duration) -> Self
pub fn poll_interval(self, interval: Duration) -> Self
Time between checks (exit poll plus one probe). Default DEFAULT_POLL_INTERVAL; raised
to at least 10 ms. A restart’s backoff is honoured to its own precision, not this one’s.
Sourcepub fn stop_grace(self, grace: Duration) -> Self
pub fn stop_grace(self, grace: Duration) -> Self
How long a child gets to exit by itself after its stdin was closed before its process tree
is killed. Default DEFAULT_STOP_GRACE.
Trait Implementations§
Source§impl Clone for SupervisorConfig
impl Clone for SupervisorConfig
impl Copy 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