wasmer_wasix::journal

Trait 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 WritableJournal for Arc<dyn Journal + Sync + Send>

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>

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>

Source§

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

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