pub struct MvccCommitBatch {
pub commit_ts: u64,
pub records: Vec<MvccLogRecord>,
}Expand description
All the writes a single BEGIN CONCURRENT transaction produced
at its commit. Encoded into one WAL frame body; replayed
atomically (a torn batch drops the whole transaction).
Fields§
§commit_ts: u64§records: Vec<MvccLogRecord>Implementations§
Source§impl MvccCommitBatch
impl MvccCommitBatch
Sourcepub fn encode(&self) -> Result<Box<[u8; 4096]>>
pub fn encode(&self) -> Result<Box<[u8; 4096]>>
Encodes self into a PAGE_SIZE byte buffer, zero-padded
past the actual payload. The buffer is what
Wal::append_frame writes as the frame body for
page_num = MVCC_FRAME_MARKER.
Returns an error if the encoded size would exceed
PAGE_SIZE (a single transaction wrote more than ~4 KB of
row data). v0 callers see this as a SQLRiteError::General;
multi-frame batch support is a separate slice.
Trait Implementations§
Source§impl Clone for MvccCommitBatch
impl Clone for MvccCommitBatch
Source§fn clone(&self) -> MvccCommitBatch
fn clone(&self) -> MvccCommitBatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MvccCommitBatch
impl Debug for MvccCommitBatch
Source§impl PartialEq for MvccCommitBatch
impl PartialEq for MvccCommitBatch
Source§fn eq(&self, other: &MvccCommitBatch) -> bool
fn eq(&self, other: &MvccCommitBatch) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MvccCommitBatch
Auto Trait Implementations§
impl Freeze for MvccCommitBatch
impl RefUnwindSafe for MvccCommitBatch
impl Send for MvccCommitBatch
impl Sync for MvccCommitBatch
impl Unpin for MvccCommitBatch
impl UnsafeUnpin for MvccCommitBatch
impl UnwindSafe for MvccCommitBatch
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