Skip to main content

NativeVersionedLog

Struct NativeVersionedLog 

Source
pub struct NativeVersionedLog<S: ?Sized> { /* private fields */ }
Expand description

Versioned transaction log backed by a native key/value-style store.

Implementations§

Source§

impl<S: NativeLogStorage + ?Sized + 'static> NativeVersionedLog<S>

Source

pub fn open( storage: Arc<S>, name: &str, write_version: u64, ) -> Result<Self, LogError>

Opens the log for writing under write_version.

§Errors

Returns an error when stored records cannot be read or decoded.

Trait Implementations§

Source§

impl<S: NativeLogStorage + ?Sized + 'static> TransactionLog for NativeVersionedLog<S>

Source§

fn append(&self, record: &TxRecord) -> Result<(), LogError>

Durably appends exactly the next transaction. Read more
Source§

fn tx_range( &self, start: u64, end: Option<u64>, ) -> Result<Vec<TxRecord>, LogError>

Returns records in the half-open transaction range [start, end). Read more
Source§

fn replay(&self) -> Result<Vec<TxRecord>, LogError>

Replays every committed record. Read more

Auto Trait Implementations§

§

impl<S> !Freeze for NativeVersionedLog<S>

§

impl<S> RefUnwindSafe for NativeVersionedLog<S>
where S: RefUnwindSafe + ?Sized,

§

impl<S> Send for NativeVersionedLog<S>
where S: Sync + Send + ?Sized,

§

impl<S> Sync for NativeVersionedLog<S>
where S: Sync + Send + ?Sized,

§

impl<S> Unpin for NativeVersionedLog<S>
where S: ?Sized,

§

impl<S> UnsafeUnpin for NativeVersionedLog<S>
where S: ?Sized,

§

impl<S> UnwindSafe for NativeVersionedLog<S>
where S: RefUnwindSafe + ?Sized,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.