Skip to main content

AtomicImportStorage

Trait AtomicImportStorage 

pub trait AtomicImportStorage: Send + Sync {
    // Required method
    fn import_batch(&self, batch: &ImportBatch) -> Result<ImportBatchResult>;
}
Expand description

Optional storage capability for all-or-none import publication.

Required Methods§

fn import_batch(&self, batch: &ImportBatch) -> Result<ImportBatchResult>

Publishes one completely staged batch at one backend commit point.

Incompatible is a successful, explicit skip. Any other error aborts the complete batch. A lost response after a backend commit is ambiguous; implementations must not silently retry the submission.

§Errors

Returns a backend error when publication fails. An incompatible trial is reported in the successful result as an explicit skip.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl AtomicImportStorage for JournalStorage

Applies one import in a shadow journal while the source generation lease is held, then publishes the shadow’s complete image exactly once.

§

impl AtomicImportStorage for MemStorage