pub struct WorkflowVersion {
pub id: u64,
pub data: String,
}Expand description
A versioned snapshot of a workflow’s serialised definition.
Fields§
§id: u64Monotonically increasing version identifier.
data: StringFull serialised workflow data (JSON, YAML, or custom DSL string).
Implementations§
Source§impl WorkflowVersion
impl WorkflowVersion
Sourcepub fn diff(&self, other: &WorkflowVersion) -> Vec<String>
pub fn diff(&self, other: &WorkflowVersion) -> Vec<String>
Compute a line-level diff between self and other.
Returns a Vec<String> where:
- Lines prefixed with
"+"are present inselfbut not inother(added relative toother). - Lines prefixed with
"-"are present inotherbut not inself(removed relative toother, i.e. present in the older version).
Lines common to both versions are not included in the output. The order within each group (additions, removals) follows their order of first appearance in the respective version.
For an identical pair the returned Vec is empty.
Sourcepub fn is_identical(&self, other: &WorkflowVersion) -> bool
pub fn is_identical(&self, other: &WorkflowVersion) -> bool
Return true if self and other contain identical data strings.
Sourcepub fn summary(&self) -> VersionSummary
pub fn summary(&self) -> VersionSummary
Return a compact summary of this version’s statistics.
Trait Implementations§
Source§impl Clone for WorkflowVersion
impl Clone for WorkflowVersion
Source§fn clone(&self) -> WorkflowVersion
fn clone(&self) -> WorkflowVersion
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 moreSource§impl Debug for WorkflowVersion
impl Debug for WorkflowVersion
impl Eq for WorkflowVersion
Source§impl PartialEq for WorkflowVersion
impl PartialEq for WorkflowVersion
impl StructuralPartialEq for WorkflowVersion
Auto Trait Implementations§
impl Freeze for WorkflowVersion
impl RefUnwindSafe for WorkflowVersion
impl Send for WorkflowVersion
impl Sync for WorkflowVersion
impl Unpin for WorkflowVersion
impl UnsafeUnpin for WorkflowVersion
impl UnwindSafe for WorkflowVersion
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.