Trait MigrateSchema

Source
pub trait MigrateSchema<NK, EK, NewVersion>
where NK: Key, EK: Key, NewVersion: SchemaExt<NK, EK>, Self: SchemaExt<NK, EK>,
{ // Required methods fn update_node( &self, new_schema: &NewVersion, node: Self::N, ) -> SchemaResult<Option<NewVersion::N>, NK, EK, NewVersion>; fn update_edge( &self, new_schema: &NewVersion, edge: Self::E, ) -> SchemaResult<Option<NewVersion::E>, NK, EK, NewVersion>; fn update_node_type( &self, new_schema: &NewVersion, node_type: <Self::N as Typed>::Type, ) -> Option<<NewVersion::N as Typed>::Type>; fn update_edge_type( &self, new_schema: &NewVersion, edge_type: <Self::E as Typed>::Type, ) -> Option<<NewVersion::E as Typed>::Type>; }

Required Methods§

Source

fn update_node( &self, new_schema: &NewVersion, node: Self::N, ) -> SchemaResult<Option<NewVersion::N>, NK, EK, NewVersion>

Update a node from its old type to the new one

Returning None indicates that there exists no equivalent in the new schema

Source

fn update_edge( &self, new_schema: &NewVersion, edge: Self::E, ) -> SchemaResult<Option<NewVersion::E>, NK, EK, NewVersion>

Update an edge from its old type to the new one

Returning None indicates that there exists no equivalent in the new schema

Source

fn update_node_type( &self, new_schema: &NewVersion, node_type: <Self::N as Typed>::Type, ) -> Option<<NewVersion::N as Typed>::Type>

Update a node type from its old version to its new one

Returning None indicates that there exists no equivalent in the new schema

Source

fn update_edge_type( &self, new_schema: &NewVersion, edge_type: <Self::E as Typed>::Type, ) -> Option<<NewVersion::E as Typed>::Type>

Update an edge type from its old version to its new one

Returning None indicates that there exists no equivalent in the new schema

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§

Source§

impl<NK, EK, OldVersion, NewVersion> MigrateSchema<NK, EK, NewVersion> for InBetween<NK, EK, OldVersion, NewVersion>
where NK: Key, EK: Key, OldVersion: SchemaExt<NK, EK> + MigrateSchema<NK, EK, NewVersion>, NewVersion: SchemaExt<NK, EK>,