pub struct WriteTransaction<F> {
pub wal_lock: Arc<WalLock>,
pub savepoints: Vec<Savepoint>,
pub next_frame_no: u64,
pub next_offset: u32,
pub current_checksum: u32,
pub is_commited: bool,
pub read_tx: ReadTransaction<F>,
pub recompute_checksum: Option<u32>,
}
Fields§
§wal_lock: Arc<WalLock>
id of the transaction currently holding the lock
savepoints: Vec<Savepoint>
§next_frame_no: u64
§next_offset: u32
§current_checksum: u32
§is_commited: bool
§read_tx: ReadTransaction<F>
§recompute_checksum: Option<u32>
if transaction overwrote frames, then the running checksum needs to be recomputed. We store here the lowest segment offset at which a frame was overwritten
Implementations§
Source§impl<F> WriteTransaction<F>
impl<F> WriteTransaction<F>
pub fn savepoint(&mut self) -> usize
pub fn lock(&mut self) -> TxGuardShared<'_, F>
pub fn into_lock_owned(self) -> TxGuardOwned<F>
pub fn reset(&mut self, savepoint_id: usize)
pub fn index_page_iter(&self) -> impl Iterator<Item = u32> + '_
pub fn not_empty(&self) -> bool
pub fn downgrade(self) -> ReadTransaction<F>
pub fn is_commited(&self) -> bool
Trait Implementations§
Source§impl<F> Deref for WriteTransaction<F>
impl<F> Deref for WriteTransaction<F>
Auto Trait Implementations§
impl<F> !Freeze for WriteTransaction<F>
impl<F> !RefUnwindSafe for WriteTransaction<F>
impl<F> Send for WriteTransaction<F>
impl<F> Sync for WriteTransaction<F>
impl<F> Unpin for WriteTransaction<F>
impl<F> !UnwindSafe for WriteTransaction<F>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.