pub struct Migration {
pub states: IndexMap<String, String, FixedState>,
pub context: Map<String, Value>,
}Expand description
How snapshots of one earlier machine version become snapshots of the current one.
Fields§
§states: IndexMap<String, String, FixedState>Earlier state id to current state id (# optional on both sides).
Ids that are not listed are kept.
context: Map<String, Value>Merged into the root actor’s context (an object), key by key.
Implementations§
Source§impl Migration
impl Migration
Sourcepub fn check<C, E, C2, E2>(
&self,
from: Option<&Machine<C, E>>,
to: &Machine<C2, E2>,
) -> Result<(), String>
pub fn check<C, E, C2, E2>( &self, from: Option<&Machine<C, E>>, to: &Machine<C2, E2>, ) -> Result<(), String>
Checks the migration against the current machine to (every target
exists) and, when the earlier definition is known, against it: every
mapped id exists there, and every earlier state that the current
machine lacks is mapped.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Migration
impl<'de> Deserialize<'de> for Migration
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Migration
Auto Trait Implementations§
impl Forget for Migration
impl Freeze for Migrationwhere
*const u8 is !null: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, String>>: Freeze,
PhantomData<fn() -> DefaultHasher>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
impl Move for Migration
impl RefUnwindSafe for Migration
impl Send for Migration
impl Sync for Migration
impl Unpin for Migration
impl UnsafeUnpin for Migrationwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, String>>: UnsafeUnpin,
PhantomData<fn() -> DefaultHasher>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
impl UnwindSafe for Migration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more