Trait wasmer_journal::WritableJournal

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

    // Provided methods
    fn commit(&self) -> Result<usize> { ... }
    fn rollback(&self) -> Result<usize> { ... }
}
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>

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

Flushes the data to disk or network

Provided Methods§

source

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

Commits the transaction Returns the number of events committed

source

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

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

Implementations on Foreign Types§

source§

impl WritableJournal for Arc<DynJournal>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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> WritableJournal for AutoConsistentJournalTx<W>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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