pub struct SnapshotStaging { /* private fields */ }Expand description
One snapshot’s staging, from its first batch to the load or file check that reads its records, or the discard that removes them (§16.2). It is the one holder of what it stages for that whole operation: its steps are its phases, and the load takes it whole. Dropped while still holding records, as by a cancelled or panicking caller, it removes them.
Implementations§
Source§impl SnapshotStaging
impl SnapshotStaging
Sourcepub async fn digest(&self) -> Result<StagedDigest, DbError>
pub async fn digest(&self) -> Result<StagedDigest, DbError>
The digest of the records it holds now (§19.1).
Source§impl SnapshotStaging
impl SnapshotStaging
Sourcepub async fn stage(&mut self, plaintext: Vec<u8>) -> Result<(), DbError>
pub async fn stage(&mut self, plaintext: Vec<u8>) -> Result<(), DbError>
Decode one batch of opened plaintext and commit its records together. After a failure, discard this staging.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SnapshotStaging
impl !RefUnwindSafe for SnapshotStaging
impl Send for SnapshotStaging
impl Sync for SnapshotStaging
impl Unpin for SnapshotStaging
impl UnsafeUnpin for SnapshotStaging
impl !UnwindSafe for SnapshotStaging
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