pub trait StoreMaintenance: MaybeSend + MaybeSync {
// Required methods
fn layout_version(&self) -> u32;
fn migrate(
&self,
) -> impl Future<Output = Result<u32, StoreError>> + MaybeSend;
fn backup_to(
&self,
dest: &str,
) -> impl Future<Output = Result<(), StoreError>> + MaybeSend;
}Expand description
Backend-defined maintenance (R-19). Optional: the pipeline never calls
it. SQLite implements it with versioned physical migrations and
VACUUM INTO (M0-09); another backend may implement it however it
likes, and every backend still has the portable export above.
Required Methods§
Sourcefn layout_version(&self) -> u32
fn layout_version(&self) -> u32
The backend’s physical layout version (its schema, e.g. SQLite’s
user_version); independent of keys::LAYOUT_VERSION.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".