pub struct WalWriter { /* private fields */ }Implementations§
Source§impl WalWriter
impl WalWriter
pub fn new( wal_dir: &PathBuf, max_segment_size: u64, sync_mode: SyncMode, ) -> Result<Self>
pub fn append(&mut self, record: WalRecord) -> Result<u64>
pub fn sync(&mut self) -> Result<()>
Sourcepub fn current_segment_path(&self) -> &PathBuf
pub fn current_segment_path(&self) -> &PathBuf
Get the current segment path
Sourcepub fn current_segment_size(&self) -> u64
pub fn current_segment_size(&self) -> u64
Get the current segment size in bytes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WalWriter
impl RefUnwindSafe for WalWriter
impl Send for WalWriter
impl Sync for WalWriter
impl Unpin for WalWriter
impl UnwindSafe for WalWriter
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