pub struct ShutdownProgress {
pub initiated: bool,
pub in_flight: u64,
pub elapsed: Option<Duration>,
pub timeout: Duration,
}Expand description
Shutdown progress for logging
Fields§
§initiated: boolWhether shutdown has been initiated
in_flight: u64Current in-flight request count
elapsed: Option<Duration>Time since shutdown was initiated
timeout: DurationDrain timeout
Implementations§
Source§impl ShutdownProgress
impl ShutdownProgress
Sourcepub fn to_log_message(&self) -> String
pub fn to_log_message(&self) -> String
Format progress as a log message
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if shutdown is complete
Sourcepub fn is_timed_out(&self) -> bool
pub fn is_timed_out(&self) -> bool
Check if shutdown has timed out
Trait Implementations§
Source§impl Clone for ShutdownProgress
impl Clone for ShutdownProgress
Source§fn clone(&self) -> ShutdownProgress
fn clone(&self) -> ShutdownProgress
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 moreAuto Trait Implementations§
impl Freeze for ShutdownProgress
impl RefUnwindSafe for ShutdownProgress
impl Send for ShutdownProgress
impl Sync for ShutdownProgress
impl Unpin for ShutdownProgress
impl UnsafeUnpin for ShutdownProgress
impl UnwindSafe for ShutdownProgress
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