pub struct EnvironmentLogWriter { /* private fields */ }Expand description
LogWriter implementation backed by the live LogManager.
Each write_entry call:
- Resolves the
entry_typebyte to aLogEntryType. - Writes the payload to the local log via
LogManager::log(). - Registers the returned LSN in the provided
vlsn_indexso that the VLSN→LSN mapping is kept up-to-date on the replica.
Implementations§
Trait Implementations§
Source§impl LogWriter for EnvironmentLogWriter
impl LogWriter for EnvironmentLogWriter
Source§fn write_entry(
&mut self,
vlsn: u64,
entry_type: u8,
payload: &[u8],
) -> Result<()>
fn write_entry( &mut self, vlsn: u64, entry_type: u8, payload: &[u8], ) -> Result<()>
Write one replicated entry to the local log.
Resolves entry_type → LogEntryType, appends the payload to the
WAL, and records the assigned LSN in the VLSN index. Returns an
error if the entry type is unknown or the write fails.
Auto Trait Implementations§
impl Freeze for EnvironmentLogWriter
impl !RefUnwindSafe for EnvironmentLogWriter
impl Send for EnvironmentLogWriter
impl Sync for EnvironmentLogWriter
impl Unpin for EnvironmentLogWriter
impl UnsafeUnpin for EnvironmentLogWriter
impl !UnwindSafe for EnvironmentLogWriter
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> 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