Skip to main content

StorageAdapter

Trait StorageAdapter 

Source
pub trait StorageAdapter {
    // Required method
    fn plan_schema(
        &self,
        target: &AppManifest,
    ) -> Result<SchemaPlan, StorageError>;

    // Provided method
    fn apply_schema(&self, _plan: &SchemaPlan) -> Result<(), StorageError> { ... }
}

Required Methods§

Source

fn plan_schema(&self, target: &AppManifest) -> Result<SchemaPlan, StorageError>

Produce a plan that would bring storage in line with the target manifest.

Provided Methods§

Source

fn apply_schema(&self, _plan: &SchemaPlan) -> Result<(), StorageError>

Apply a schema plan. Not implemented by dry-run adapters.

Implementors§