pub struct ShutdownConfig {
pub strategy: ShutdownStrategy,
pub graceful_timeout: Duration,
pub terminate_timeout: Duration,
pub exit_command: Option<String>,
pub wait_for_exit: bool,
}Expand description
Configuration for session shutdown.
Fields§
§strategy: ShutdownStrategyThe shutdown strategy to use.
graceful_timeout: DurationTimeout for graceful shutdown.
terminate_timeout: DurationTimeout for terminate signal.
exit_command: Option<String>Exit command to send for graceful shutdown.
wait_for_exit: boolWhether to wait for process to exit.
Implementations§
Source§impl ShutdownConfig
impl ShutdownConfig
Sourcepub fn with_exit_command(self, command: impl Into<String>) -> Self
pub fn with_exit_command(self, command: impl Into<String>) -> Self
Create a new shutdown config with custom exit command.
Sourcepub const fn with_graceful_timeout(self, timeout: Duration) -> Self
pub const fn with_graceful_timeout(self, timeout: Duration) -> Self
Set the graceful timeout.
Trait Implementations§
Source§impl Clone for ShutdownConfig
impl Clone for ShutdownConfig
Source§fn clone(&self) -> ShutdownConfig
fn clone(&self) -> ShutdownConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ShutdownConfig
impl Debug for ShutdownConfig
Auto Trait Implementations§
impl Freeze for ShutdownConfig
impl RefUnwindSafe for ShutdownConfig
impl Send for ShutdownConfig
impl Sync for ShutdownConfig
impl Unpin for ShutdownConfig
impl UnwindSafe for ShutdownConfig
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