pub struct VersionMigration {
pub from: WorkflowVersion,
pub to: WorkflowVersion,
pub description: String,
}Expand description
A migration that transforms a workflow payload from one version to another.
Fields§
§from: WorkflowVersionThe schema version this migration originates from.
to: WorkflowVersionThe schema version this migration produces.
description: StringShort description of what the migration does.
Implementations§
Source§impl VersionMigration
impl VersionMigration
Sourcepub fn new(
from: WorkflowVersion,
to: WorkflowVersion,
description: impl Into<String>,
) -> Self
pub fn new( from: WorkflowVersion, to: WorkflowVersion, description: impl Into<String>, ) -> Self
Create a new migration descriptor.
Sourcepub fn from_version(&self) -> &WorkflowVersion
pub fn from_version(&self) -> &WorkflowVersion
Source version of this migration.
Sourcepub fn to_version(&self) -> &WorkflowVersion
pub fn to_version(&self) -> &WorkflowVersion
Target version of this migration.
Sourcepub fn is_major_migration(&self) -> bool
pub fn is_major_migration(&self) -> bool
Returns true if this migration is a major-version bump.
Trait Implementations§
Source§impl Clone for VersionMigration
impl Clone for VersionMigration
Source§fn clone(&self) -> VersionMigration
fn clone(&self) -> VersionMigration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for VersionMigration
impl RefUnwindSafe for VersionMigration
impl Send for VersionMigration
impl Sync for VersionMigration
impl Unpin for VersionMigration
impl UnsafeUnpin for VersionMigration
impl UnwindSafe for VersionMigration
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