pub struct SupervisorConfig {
pub default_backoff: BackoffConfig,
pub shutdown_timeout: Duration,
pub install_signal_handler: bool,
}Expand description
Configuration for the Supervisor.
Fields§
§default_backoff: BackoffConfigDefault backoff config applied to services that don’t override it.
shutdown_timeout: DurationMaximum time to wait for services to drain during shutdown.
install_signal_handler: boolWhether to install a Ctrl-C / SIGTERM handler automatically.
Implementations§
Source§impl SupervisorConfig
impl SupervisorConfig
Sourcepub fn with_shutdown_timeout(self, timeout: Duration) -> Self
pub fn with_shutdown_timeout(self, timeout: Duration) -> Self
Override the drain timeout.
Sourcepub fn with_default_backoff(self, backoff: BackoffConfig) -> Self
pub fn with_default_backoff(self, backoff: BackoffConfig) -> Self
Override the default backoff config applied to services that don’t
supply their own SpawnOptions::backoff.
Sourcepub fn without_signal_handler(self) -> Self
pub fn without_signal_handler(self) -> Self
Skip installing the supervisor’s signal handler — the host service drives shutdown directly.
Trait 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