Trait Migration

Source
pub trait Migration<NK, EK, NewVersion>: SchemaExt<NK, EK>
where NK: Key, EK: Key, NewVersion: SchemaExt<NK, EK> + Clone, Self: MigrateSchema<NK, EK, NewVersion> + Clone,
{ type Handler: Migrationhandler<NK, EK, Self, NewVersion>; // Provided method fn migrate( g: TypedGraph<NK, EK, Self>, handler: &Self::Handler, new_schema: NewVersion, ) -> GenericTypedResult<TypedGraph<NK, EK, NewVersion>, NK, EK> { ... } }

Required Associated Types§

Source

type Handler: Migrationhandler<NK, EK, Self, NewVersion>

Provided Methods§

Source

fn migrate( g: TypedGraph<NK, EK, Self>, handler: &Self::Handler, new_schema: NewVersion, ) -> GenericTypedResult<TypedGraph<NK, EK, NewVersion>, NK, EK>

mirgate the data store in one schema to another

Most of the time the default implementation is used as it uses an InBetween representation of the shemas to ensure type safety all throughout the migration process

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§