pub struct CoordinatedShutdown { /* private fields */ }Implementations§
Source§impl CoordinatedShutdown
impl CoordinatedShutdown
pub fn new() -> Self
pub fn add_task<F>(&self, phase: Phase, name: impl Into<String>, hook: F)
Sourcepub fn configure_phase(&self, phase: Phase, config: PhaseConfig)
pub fn configure_phase(&self, phase: Phase, config: PhaseConfig)
Configure the timeout / recovery policy for a single phase.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Has shutdown already been initiated?
CoordinatedShutdown.IsRunning.
Trait Implementations§
Source§impl Clone for CoordinatedShutdown
impl Clone for CoordinatedShutdown
Source§fn clone(&self) -> CoordinatedShutdown
fn clone(&self) -> CoordinatedShutdown
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 Default for CoordinatedShutdown
impl Default for CoordinatedShutdown
Source§fn default() -> CoordinatedShutdown
fn default() -> CoordinatedShutdown
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CoordinatedShutdown
impl !RefUnwindSafe for CoordinatedShutdown
impl Send for CoordinatedShutdown
impl Sync for CoordinatedShutdown
impl Unpin for CoordinatedShutdown
impl UnsafeUnpin for CoordinatedShutdown
impl !UnwindSafe for CoordinatedShutdown
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