pub struct SqlHlcStorage { /* private fields */ }Expand description
Persistence for the clock register, scoped to a table-name prefix.
Implementations§
Trait Implementations§
Source§impl HlcStorage for SqlHlcStorage
impl HlcStorage for SqlHlcStorage
Source§fn load(&self) -> Result<Option<u64>, Self::Error>
fn load(&self) -> Result<Option<u64>, Self::Error>
Return the seed cached at open. No I/O — the read already happened.
Source§fn save(&self, sink: &mut Self::Sink, raw: u64) -> Result<(), Self::Error>
fn save(&self, sink: &mut Self::Sink, raw: u64) -> Result<(), Self::Error>
Enqueue the clock-state upsert into sink. Durable when the caller
commits the sink. The packed u64 occupies the full 64-bit width
(48-bit millis << 16 | 16-bit counter), so DbValue::from_u64
rejects a value past i64::MAX rather than wrap it negative — which
would also break the signed MAX-guard merge. The real clock stays far
below that bound (millis below 2^47, ~year 6400).
Auto Trait Implementations§
impl Freeze for SqlHlcStorage
impl RefUnwindSafe for SqlHlcStorage
impl Send for SqlHlcStorage
impl Sync for SqlHlcStorage
impl Unpin for SqlHlcStorage
impl UnsafeUnpin for SqlHlcStorage
impl UnwindSafe for SqlHlcStorage
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