pub struct ContextCheckpointIdentityV1 {
pub checkpoint_id: ContextCheckpointIdV1,
pub parent_checkpoint_id: Option<ContextCheckpointIdV1>,
pub parent_device_id: Option<ContextCheckpointDeviceIdV1>,
pub parent_branch_id: Option<ContextCheckpointBranchIdV1>,
pub parent_device_sequence: Option<u64>,
pub branch_id: ContextCheckpointBranchIdV1,
pub device_id: ContextCheckpointDeviceIdV1,
pub device_sequence: u64,
}Expand description
Parent, branch, and device identity of one checkpoint.
Fields§
§checkpoint_id: ContextCheckpointIdV1Identity of this checkpoint.
parent_checkpoint_id: Option<ContextCheckpointIdV1>Identity of the checkpoint this one continues, if any.
parent_device_id: Option<ContextCheckpointDeviceIdV1>Device that produced the parent checkpoint.
parent_branch_id: Option<ContextCheckpointBranchIdV1>Branch advanced by the parent checkpoint.
parent_device_sequence: Option<u64>Parent’s monotonic sequence on its producing device.
branch_id: ContextCheckpointBranchIdV1Branch the writing device advances.
device_id: ContextCheckpointDeviceIdV1Device that produced this checkpoint.
device_sequence: u64Monotonic per-device sequence number, starting at one.
Implementations§
Source§impl ContextCheckpointIdentityV1
impl ContextCheckpointIdentityV1
Sourcepub fn try_new(
checkpoint_id: ContextCheckpointIdV1,
parent_checkpoint_id: Option<ContextCheckpointIdV1>,
parent_device_id: Option<ContextCheckpointDeviceIdV1>,
parent_branch_id: Option<ContextCheckpointBranchIdV1>,
parent_device_sequence: Option<u64>,
branch_id: ContextCheckpointBranchIdV1,
device_id: ContextCheckpointDeviceIdV1,
device_sequence: u64,
) -> Result<Self, ValidationError>
pub fn try_new( checkpoint_id: ContextCheckpointIdV1, parent_checkpoint_id: Option<ContextCheckpointIdV1>, parent_device_id: Option<ContextCheckpointDeviceIdV1>, parent_branch_id: Option<ContextCheckpointBranchIdV1>, parent_device_sequence: Option<u64>, branch_id: ContextCheckpointBranchIdV1, device_id: ContextCheckpointDeviceIdV1, device_sequence: u64, ) -> Result<Self, ValidationError>
Construct a validated identity.
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate every identity and sequence invariant.
Trait Implementations§
Source§impl Clone for ContextCheckpointIdentityV1
impl Clone for ContextCheckpointIdentityV1
Source§impl Debug for ContextCheckpointIdentityV1
impl Debug for ContextCheckpointIdentityV1
Source§impl<'de> Deserialize<'de> for ContextCheckpointIdentityV1
impl<'de> Deserialize<'de> for ContextCheckpointIdentityV1
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
impl Eq for ContextCheckpointIdentityV1
impl StructuralPartialEq for ContextCheckpointIdentityV1
Auto Trait Implementations§
impl Forget for ContextCheckpointIdentityV1
impl Freeze for ContextCheckpointIdentityV1
impl Move for ContextCheckpointIdentityV1
impl RefUnwindSafe for ContextCheckpointIdentityV1
impl Send for ContextCheckpointIdentityV1
impl Sync for ContextCheckpointIdentityV1
impl Unpin for ContextCheckpointIdentityV1
impl UnsafeUnpin for ContextCheckpointIdentityV1
impl UnwindSafe for ContextCheckpointIdentityV1
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