Skip to main content

DataStoreMaintenance

Trait DataStoreMaintenance 

Source
pub trait DataStoreMaintenance {
    // Required methods
    fn prune(
        &mut self,
        policy: &RetentionPolicy,
        as_of: &str,
    ) -> Result<MaintenanceEvidence, MaintenanceError>;
    fn backup(
        &mut self,
        destination: &Path,
        as_of: &str,
    ) -> Result<MaintenanceEvidence, MaintenanceError>;
    fn restore(
        &mut self,
        archive: &Path,
        as_of: &str,
    ) -> Result<MaintenanceEvidence, MaintenanceError>;
}
Expand description

Separate maintenance port for the same root and exclusive lock (FR-001).

Required Methods§

Source

fn prune( &mut self, policy: &RetentionPolicy, as_of: &str, ) -> Result<MaintenanceEvidence, MaintenanceError>

Prunes records under host policy with required as_of (FR-002/FR-003).

§Errors

Returns MaintenanceError when the policy is invalid or prune fails.

Source

fn backup( &mut self, destination: &Path, as_of: &str, ) -> Result<MaintenanceEvidence, MaintenanceError>

Writes a verified zip backup to destination (FR-004/FR-006/FR-007).

§Errors

Returns MaintenanceError when backup or verification fails.

Source

fn restore( &mut self, archive: &Path, as_of: &str, ) -> Result<MaintenanceEvidence, MaintenanceError>

Verifies an archive and atomically replaces the store root (FR-005/FR-008).

§Errors

Returns MaintenanceError when verification or replace fails.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§