pub struct HlcTransaction<'clock> { /* private fields */ }Expand description
Clock state staged beside a synchronous database transaction.
Timestamps returned here belong to that transaction and must not be exposed
as committed values before Self::commit. The existing clock mutex stays
locked until this guard is consumed or dropped, so concurrent stampers cannot
mint from the uncommitted state.
Implementations§
Source§impl HlcTransaction<'_>
impl HlcTransaction<'_>
Sourcepub fn now(&mut self) -> Timestamp
pub fn now(&mut self) -> Timestamp
Mint a timestamp after the staged acceptance floor and prior stamps.
Sourcepub fn advance_past(&mut self, remote: &Timestamp)
pub fn advance_past(&mut self, remote: &Timestamp)
Stage an authoritative register floor using Hlc::advance_past’s rules.
Sourcepub fn high_water(&self) -> Timestamp
pub fn high_water(&self) -> Timestamp
The staged floor to persist in the database transaction.
Auto Trait Implementations§
impl<'clock> Freeze for HlcTransaction<'clock>
impl<'clock> !RefUnwindSafe for HlcTransaction<'clock>
impl<'clock> !Send for HlcTransaction<'clock>
impl<'clock> Sync for HlcTransaction<'clock>
impl<'clock> Unpin for HlcTransaction<'clock>
impl<'clock> UnsafeUnpin for HlcTransaction<'clock>
impl<'clock> !UnwindSafe for HlcTransaction<'clock>
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