pub struct Workflow { /* private fields */ }Expand description
Kanban workflow (ordered set of columns).
Implementations§
Source§impl Workflow
impl Workflow
Sourcepub fn new(columns: impl IntoIterator<Item = Status>) -> Self
pub fn new(columns: impl IntoIterator<Item = Status>) -> Self
Build a workflow from columns (left to right in workflow order).
Sourcepub fn default_status(&self) -> Option<&Status>
pub fn default_status(&self) -> Option<&Status>
Default state (first column).
Sourcepub fn contains(&self, status: &Status) -> bool
pub fn contains(&self, status: &Status) -> bool
Whether the specified state exists in the workflow.
Sourcepub fn can_transition(&self, from: &Status, to: &Status) -> bool
pub fn can_transition(&self, from: &Status, to: &Status) -> bool
Whether a transition from from to to is valid.
It is valid when both columns are known; Kanban permits moves between any columns.
Trait Implementations§
impl Eq for Workflow
impl StructuralPartialEq for Workflow
Auto Trait Implementations§
impl Freeze for Workflow
impl RefUnwindSafe for Workflow
impl Send for Workflow
impl Sync for Workflow
impl Unpin for Workflow
impl UnsafeUnpin for Workflow
impl UnwindSafe for Workflow
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more