Trait wasmer_wasix::journal::WritableJournal

source ·
pub trait WritableJournal: Debug {
    // Required methods
    fn write<'a>(
        &'a self,
        entry: JournalEntry<'a>,
    ) -> Result<LogWriteResult, Error>;
    fn flush(&self) -> Result<(), Error>;

    // Provided methods
    fn commit(&self) -> Result<usize, Error> { ... }
    fn rollback(&self) -> Result<usize, Error> { ... }
}
Expand description

The snapshot capturer will take a series of objects that represents the state of a WASM process at a point in time and saves it so that it can be restored. It also allows for the restoration of that state at a later moment

Required Methods§

source

fn write<'a>(&'a self, entry: JournalEntry<'a>) -> Result<LogWriteResult, Error>

Takes in a stream of snapshot log entries and saves them so that they may be restored at a later moment

source

fn flush(&self) -> Result<(), Error>

Flushes the data to disk or network

Provided Methods§

source

fn commit(&self) -> Result<usize, Error>

Commits the transaction Returns the number of events committed

source

fn rollback(&self) -> Result<usize, Error>

Rolls back the transaction and aborts its changes Returns the number of events rolled back

Implementations on Foreign Types§

source§

impl<W> WritableJournal for Box<W>
where W: WritableJournal + ?Sized,

source§

fn write<'a>(&'a self, entry: JournalEntry<'a>) -> Result<LogWriteResult, Error>

source§

fn flush(&self) -> Result<(), Error>

source§

fn commit(&self) -> Result<usize, Error>

source§

fn rollback(&self) -> Result<usize, Error>

Implementors§

source§

impl WritableJournal for Arc<dyn Journal + Send + Sync>

source§

impl WritableJournal for BufferedJournal

source§

impl WritableJournal for BufferedJournalTx

source§

impl WritableJournal for CompactingJournal

source§

impl WritableJournal for CompactingJournalTx

source§

impl WritableJournal for CompactingLogFileJournal

source§

impl WritableJournal for CompactingLogFileJournalTx

source§

impl WritableJournal for CountingJournal

source§

impl WritableJournal for LogFileJournal

source§

impl WritableJournal for LogFileJournalTx

source§

impl WritableJournal for MemFileJournal

source§

impl WritableJournal for NullJournal

source§

impl WritableJournal for PipeJournal

source§

impl WritableJournal for PipeJournalTx

source§

impl WritableJournal for PrintingJournal

source§

impl WritableJournal for UnsupportedJournal

source§

impl<W> WritableJournal for Arc<W>
where W: WritableJournal,

source§

impl<W> WritableJournal for AutoConsistentJournalTx<W>
where W: WritableJournal,

source§

impl<W> WritableJournal for CompactingTransactionJournalTx<W>
where W: WritableJournal,

source§

impl<W> WritableJournal for FilteredJournalTx<W>
where W: WritableJournal,

source§

impl<W> WritableJournal for TransactionJournalTx<W>
where W: WritableJournal,

source§

impl<W, R> WritableJournal for AutoConsistentJournal<W, R>

source§

impl<W, R> WritableJournal for CompactingTransactionJournal<W, R>

source§

impl<W, R> WritableJournal for FilteredJournal<W, R>

source§

impl<W, R> WritableJournal for RecombinedJournal<W, R>

source§

impl<W, R> WritableJournal for TransactionJournal<W, R>