Skip to main content

Wal

Struct Wal 

Source
pub struct Wal { /* private fields */ }

Implementations§

Source§

impl Wal

Source

pub fn open(path: &Path, mode: IoMode) -> Result<Wal>

Source

pub fn inspect(path: &Path, mode: IoMode) -> Result<Scan>

Walk the log without opening it for use and without changing a byte of it – no set_len, no sync_data, and no refusal either: the caller gets the Stop and decides. recover() is the caller, and it needs all three of those properties, because it is the path that has to still work on exactly the images open refuses.

Source

pub fn end_offset(&self) -> u64

Source

pub fn append(&mut self, kind: RecKind, payload: &[u8]) -> Result<u64>

Source

pub fn flush(&mut self) -> Result<()>

SyncMode::Normal’s barrier: durable against an OS crash, not necessarily against a loss of power to the drive. Push the buffer to the file. Not a barrier. Every path that reads the file or promises durability calls this first.

Source

pub fn sync_data(&mut self) -> Result<()>

Source

pub fn sync_full(&mut self) -> Result<()>

SyncMode::Full’s barrier: the strongest this platform can issue.

Source

pub fn sync_full_primitive(&self) -> &'static str

The exact primitive sync_full issues here, so a measurement can name what it did rather than imply it.

Source

pub fn set_lsn_floor(&mut self, floor: u64)

Raise the LSN floor. scan derives next_lsn from the file, so after a rotation leaves the log empty, a restart would otherwise renumber from 1. The store persists the high-water mark in the superblock and re-supplies it here at open.

Source

pub fn next_lsn(&self) -> u64

Source

pub fn rotate(&mut self) -> Result<()>

Discard the log. MUST be called only after the pages it protects are durably on disk and the directory has been fsynced.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Wal

§

impl !UnwindSafe for Wal

§

impl Freeze for Wal

§

impl Send for Wal

§

impl Sync for Wal

§

impl Unpin for Wal

§

impl UnsafeUnpin for Wal

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.