pub struct CommitAck { /* private fields */ }Expand description
Handle returned by DonaDbX::commit().
After a commit() call, the active log is atomically swapped and the Rayon
fold pool begins computing the new state root in the background. CommitAck
lets callers synchronise with that computation.
- Call
wait()to block until the fold completes and obtain the 32-byte state root. Use this at the end of a block when you need the root before producing a block header. - Call
try_poll()to check without blocking whether the fold has finished. Useful in async runtimes or polling loops where blocking is undesirable.
The #[must_use] attribute ensures that accidentally discarding an ack
(and therefore never waiting for the fold) produces a compiler warning.
Implementations§
Auto Trait Implementations§
impl !Sync for CommitAck
impl Freeze for CommitAck
impl RefUnwindSafe for CommitAck
impl Send for CommitAck
impl Unpin for CommitAck
impl UnsafeUnpin for CommitAck
impl UnwindSafe for CommitAck
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more