[−][src]Struct growthring::wal::WALWriter
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]
&'a mut self,
records: Vec<R>
) -> Vec<impl Future<Output = Result<(R, WALRingId), ()>> + 'a>
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 WALRingId
s. 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]
&'a mut self,
records: T
) -> impl Future<Output = Result<(), ()>> + 'a
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
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]
F: Unpin,
impl<F> !UnwindSafe for WALWriter<F>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,