pub struct IdentityMigration<W> { /* private fields */ }Expand description
A no-op StateMigration for workflows whose state schema did not change
between two BDEW format versions.
Use this when the FV transition only added new optional AHB rules, segment
cardinality changes, or code-list entries — no field was renamed, removed,
or made mandatory. The migrated snapshot repoints workflow_id to the new
FV while keeping the state value identical.
§Example
ⓘ
use mako_engine::migration::IdentityMigration;
use mako_engine::version::WorkflowId;
use mako_gpke::lf_anmeldung::{GpkeLfAnmeldungWorkflow, WORKFLOW_NAME};
let migration = IdentityMigration::<GpkeLfAnmeldungWorkflow>::new(
WorkflowId::new(WORKFLOW_NAME, "FV2025-10-01"),
WorkflowId::new(WORKFLOW_NAME, "FV2026-10-01"),
);Implementations§
Source§impl<W: Workflow> IdentityMigration<W>
impl<W: Workflow> IdentityMigration<W>
Sourcepub fn new(source: WorkflowId, target: WorkflowId) -> Self
pub fn new(source: WorkflowId, target: WorkflowId) -> Self
Construct a new identity migration between two format versions.
Trait Implementations§
Source§impl<W> StateMigration for IdentityMigration<W>
impl<W> StateMigration for IdentityMigration<W>
Source§type FromWorkflow = W
type FromWorkflow = W
The old workflow definition whose events are stored in matched streams.
Source§type ToWorkflow = W
type ToWorkflow = W
The new workflow definition that continues execution after migration.
Source§fn source_workflow_id(&self) -> &WorkflowId
fn source_workflow_id(&self) -> &WorkflowId
The
WorkflowId (name + old BDEW FV) that identifies streams to migrate.Source§fn target_workflow_id(&self) -> &WorkflowId
fn target_workflow_id(&self) -> &WorkflowId
The
WorkflowId (name + new BDEW FV) stamped into the migrated snapshot.Auto Trait Implementations§
impl<W> Freeze for IdentityMigration<W>
impl<W> RefUnwindSafe for IdentityMigration<W>
impl<W> Send for IdentityMigration<W>
impl<W> Sync for IdentityMigration<W>
impl<W> Unpin for IdentityMigration<W>
impl<W> UnsafeUnpin for IdentityMigration<W>
impl<W> UnwindSafe for IdentityMigration<W>
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