pub struct CommitMarkerRecord {
pub commit_seq: u64,
pub commit_time_unix_ns: u64,
pub capsule_object_id: [u8; 16],
pub proof_object_id: [u8; 16],
pub prev_marker_id: [u8; 16],
pub marker_id: [u8; 16],
}Expand description
On-disk commit marker record.
Layout (88 bytes, all LE):
commit_seq : u64 (8)
commit_time_unix_ns : u64 (8)
capsule_object_id : [u8;16] (16)
proof_object_id : [u8;16] (16)
prev_marker_id : [u8;16] (16) — 0 for genesis
marker_id : [u8;16] (16)
record_xxh3 : u64 (8)Fields§
§commit_seq: u64Monotonic commit sequence number (gap-free within a segment).
commit_time_unix_ns: u64Commit timestamp in nanoseconds since Unix epoch.
capsule_object_id: [u8; 16]ObjectId of the commit capsule.
proof_object_id: [u8; 16]ObjectId of the proof object.
prev_marker_id: [u8; 16]marker_id of the previous commit (all zeros for genesis).
marker_id: [u8; 16]This record’s marker_id: Trunc128(BLAKE3("fsqlite:marker:v1" || prefix_bytes)).
Implementations§
Source§impl CommitMarkerRecord
impl CommitMarkerRecord
Sourcepub fn new(
commit_seq: u64,
commit_time_unix_ns: u64,
capsule_object_id: [u8; 16],
proof_object_id: [u8; 16],
prev_marker_id: [u8; 16],
) -> Self
pub fn new( commit_seq: u64, commit_time_unix_ns: u64, capsule_object_id: [u8; 16], proof_object_id: [u8; 16], prev_marker_id: [u8; 16], ) -> Self
Create a new record, computing marker_id from the other fields.
Sourcepub fn encode(&self) -> [u8; 88]
pub fn encode(&self) -> [u8; 88]
Encode to exactly COMMIT_MARKER_RECORD_BYTES bytes.
Sourcepub fn decode(data: &[u8]) -> Result<Self, MarkerError>
pub fn decode(data: &[u8]) -> Result<Self, MarkerError>
Decode from a byte slice. Validates xxh3 checksum.
Sourcepub fn verify_marker_id(&self) -> bool
pub fn verify_marker_id(&self) -> bool
Verify that marker_id matches the recomputed value.
Trait Implementations§
Source§impl Clone for CommitMarkerRecord
impl Clone for CommitMarkerRecord
Source§fn clone(&self) -> CommitMarkerRecord
fn clone(&self) -> CommitMarkerRecord
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 CommitMarkerRecord
impl Debug for CommitMarkerRecord
Source§impl PartialEq for CommitMarkerRecord
impl PartialEq for CommitMarkerRecord
impl Eq for CommitMarkerRecord
impl StructuralPartialEq for CommitMarkerRecord
Auto Trait Implementations§
impl Freeze for CommitMarkerRecord
impl RefUnwindSafe for CommitMarkerRecord
impl Send for CommitMarkerRecord
impl Sync for CommitMarkerRecord
impl Unpin for CommitMarkerRecord
impl UnsafeUnpin for CommitMarkerRecord
impl UnwindSafe for CommitMarkerRecord
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> 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).