pub struct BlockWriter {
pub log: Arc<CommutativeLog>,
pub height: u64,
}Expand description
Re-export so callers can use BlockWriter without importing dual_buffer.
A write handle scoped to one thread and one block.
Obtained via crate::DonaDbX::writer.
Holds a direct Arc to the shard’s current log — no ArcSwap guard is
re-acquired on each write, so the hot put() path touches zero shared
state beyond the shard’s own write_offset atomic.
Create one BlockWriter per thread at the start of each block and drop it
before calling crate::DonaDbX::commit.
Fields§
§log: Arc<CommutativeLog>Direct reference to the active shard log for this block.
height: u64Block height recorded in every record written through this handle.
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BlockWriter
impl !UnwindSafe for BlockWriter
impl Freeze for BlockWriter
impl Send for BlockWriter
impl Sync for BlockWriter
impl Unpin for BlockWriter
impl UnsafeUnpin for BlockWriter
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