pub struct CheckpointState {
pub last_checkpoint: Option<Time>,
pub last_message: Option<String>,
pub checkpoint_count: u64,
}Expand description
State for tracking checkpoint progress.
This struct tracks progress reporting checkpoints, which are distinct from cancellation checkpoints. Progress checkpoints indicate that a task is making forward progress and are useful for:
- Detecting stuck/stalled tasks
- Work-stealing scheduler decisions
- Observability and debugging
Fields§
§last_checkpoint: Option<Time>The runtime time of the last checkpoint.
last_message: Option<String>The message from the last checkpoint_with() call.
checkpoint_count: u64The total number of checkpoints recorded.
Implementations§
Source§impl CheckpointState
impl CheckpointState
Sourcepub fn record_with_message(&mut self, message: String)
pub fn record_with_message(&mut self, message: String)
Records a checkpoint with a message.
Sourcepub fn record_with_message_at(&mut self, message: String, at: Time)
pub fn record_with_message_at(&mut self, message: String, at: Time)
Records a checkpoint with a message at an explicit runtime time.
Trait Implementations§
Source§impl Clone for CheckpointState
impl Clone for CheckpointState
Source§fn clone(&self) -> CheckpointState
fn clone(&self) -> CheckpointState
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 CheckpointState
impl Debug for CheckpointState
Auto Trait Implementations§
impl Freeze for CheckpointState
impl RefUnwindSafe for CheckpointState
impl Send for CheckpointState
impl Sync for CheckpointState
impl Unpin for CheckpointState
impl UnsafeUnpin for CheckpointState
impl UnwindSafe for CheckpointState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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).