pub enum CheckpointRecordLifecycle {
Active {},
Released {
released_at_ms: u64,
},
}Expand description
Monotonic lifecycle of a durable checkpoint record.
A new record starts active and pins its basis. Explicit release or expiry moves it to the terminal released state by compare-and-swap. Released records serve no reads and are deleted after the release grace period. Creating another pin always creates a new record id.
Variants§
Active
Protects the checkpoint basis. The sole state a read may serve from.
The braces make serde reject a stray released_at_ms; a unit variant
would silently accept and discard that field.
Released
Terminal: the pin is gone and the record is waiting to be deleted.
Trait Implementations§
Source§impl Clone for CheckpointRecordLifecycle
impl Clone for CheckpointRecordLifecycle
Source§fn clone(&self) -> CheckpointRecordLifecycle
fn clone(&self) -> CheckpointRecordLifecycle
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 moreimpl Copy for CheckpointRecordLifecycle
Source§impl Debug for CheckpointRecordLifecycle
impl Debug for CheckpointRecordLifecycle
Source§impl<'de> Deserialize<'de> for CheckpointRecordLifecycle
impl<'de> Deserialize<'de> for CheckpointRecordLifecycle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CheckpointRecordLifecycle
impl Display for CheckpointRecordLifecycle
impl Eq for CheckpointRecordLifecycle
impl StructuralPartialEq for CheckpointRecordLifecycle
Auto Trait Implementations§
impl Freeze for CheckpointRecordLifecycle
impl RefUnwindSafe for CheckpointRecordLifecycle
impl Send for CheckpointRecordLifecycle
impl Sync for CheckpointRecordLifecycle
impl Unpin for CheckpointRecordLifecycle
impl UnsafeUnpin for CheckpointRecordLifecycle
impl UnwindSafe for CheckpointRecordLifecycle
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