Trait vapcore_snapshot::Rebuilder[][src]

pub trait Rebuilder: Send {
    fn feed(
        &mut self,
        chunk: &[u8],
        engine: &dyn Engine,
        abort_flag: &AtomicBool
    ) -> Result<(), Error>;
fn finalize(&mut self) -> Result<(), Error>; }

Restore from secondary snapshot chunks.

Required methods

fn feed(
    &mut self,
    chunk: &[u8],
    engine: &dyn Engine,
    abort_flag: &AtomicBool
) -> Result<(), Error>
[src]

Feed a chunk, potentially out of order.

Check abort_flag periodically while doing heavy work. If set to false, should bail with Error::RestorationAborted.

fn finalize(&mut self) -> Result<(), Error>[src]

Finalize the restoration. Will be done after all chunks have been fed successfully.

This should apply the necessary “glue” between chunks, and verify against the restored state.

Loading content...

Implementors

impl Rebuilder for PowRebuilder[src]

fn feed(
    &mut self,
    chunk: &[u8],
    engine: &dyn Engine,
    abort_flag: &AtomicBool
) -> Result<(), VapcoreError>
[src]

Feed the rebuilder an uncompressed block chunk. Returns the number of blocks fed or any errors.

fn finalize(&mut self) -> Result<(), VapcoreError>[src]

Glue together any disconnected chunks and check that the chain is complete.

Loading content...