[][src]Struct growthring::wal::WALWriter

pub struct WALWriter<F: WALStore> { /* fields omitted */ }

Implementations

impl<F: WALStore> WALWriter<F>[src]

pub fn grow<'a, R: Record + 'a>(
    &'a mut self,
    records: Vec<R>
) -> Vec<impl Future<Output = Result<(R, WALRingId), ()>> + 'a>
[src]

Submit a sequence of records to WAL. It returns a vector of futures, each of which corresponds to one record. When a future resolves to WALRingId, it is guaranteed the record is already logged. Then, after finalizing the changes encoded by that record to the persistent storage, the caller can recycle the WAL files by invoking the given peel with the given WALRingIds. Note: each serialized record should contain at least 1 byte (empty record payload will result in assertion failure).

pub fn peel<'a, T: AsRef<[WALRingId]>>(
    &'a mut self,
    records: T
) -> impl Future<Output = Result<(), ()>> + 'a
[src]

Inform the WALWriter that some data writes are complete so that it could automatically remove obsolete WAL files. The given list of WALRingId does not need to be ordered and could be of arbitrary length.

pub fn file_pool_in_use(&self) -> usize[src]

Trait Implementations

impl<F> Send for WALWriter<F> where
    F: WALStore + Send
[src]

Auto Trait Implementations

impl<F> !RefUnwindSafe for WALWriter<F>[src]

impl<F> !Sync for WALWriter<F>[src]

impl<F> Unpin for WALWriter<F> where
    F: Unpin
[src]

impl<F> !UnwindSafe for WALWriter<F>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.