pub enum ShutdownOutcome<T> {
Completed(T),
GracefulShutdown,
ForcedShutdown,
}Expand description
Outcome of running with graceful shutdown.
Variants§
Completed(T)
The future completed normally.
GracefulShutdown
Graceful shutdown was triggered.
ForcedShutdown
Forced shutdown was triggered (second signal).
Implementations§
Source§impl<T> ShutdownOutcome<T>
impl<T> ShutdownOutcome<T>
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Returns true if the future completed normally.
Sourcepub fn is_shutdown(&self) -> bool
pub fn is_shutdown(&self) -> bool
Returns true if shutdown was triggered.
Sourcepub fn into_completed(self) -> Option<T>
pub fn into_completed(self) -> Option<T>
Extract the completed value, if any.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ShutdownOutcome<T>where
T: Freeze,
impl<T> RefUnwindSafe for ShutdownOutcome<T>where
T: RefUnwindSafe,
impl<T> Send for ShutdownOutcome<T>where
T: Send,
impl<T> Sync for ShutdownOutcome<T>where
T: Sync,
impl<T> Unpin for ShutdownOutcome<T>where
T: Unpin,
impl<T> UnwindSafe for ShutdownOutcome<T>where
T: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).