pub struct CheckpointStore { /* private fields */ }Expand description
In-memory store of checkpoints, keyed by CheckpointId.
Implementations§
Source§impl CheckpointStore
impl CheckpointStore
Sourcepub fn save(&mut self, checkpoint: Checkpoint)
pub fn save(&mut self, checkpoint: Checkpoint)
Save a checkpoint.
Sourcepub fn load(&self, id: &CheckpointId) -> Option<&Checkpoint>
pub fn load(&self, id: &CheckpointId) -> Option<&Checkpoint>
Load a checkpoint by ID, returning a reference if found.
Sourcepub fn latest_for_job(&self, job_id: &str) -> Option<&Checkpoint>
pub fn latest_for_job(&self, job_id: &str) -> Option<&Checkpoint>
Return the most recently created checkpoint for a job (by created_at_ms).
Trait Implementations§
Source§impl Debug for CheckpointStore
impl Debug for CheckpointStore
Source§impl Default for CheckpointStore
impl Default for CheckpointStore
Source§fn default() -> CheckpointStore
fn default() -> CheckpointStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CheckpointStore
impl RefUnwindSafe for CheckpointStore
impl Send for CheckpointStore
impl Sync for CheckpointStore
impl Unpin for CheckpointStore
impl UnsafeUnpin for CheckpointStore
impl UnwindSafe for CheckpointStore
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: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request