#[non_exhaustive]pub struct WorkflowBrief {
pub key: WorkflowKey,
pub summary: Option<String>,
pub glossary: Vec<GlossaryTerm>,
pub startable: bool,
pub operations: Vec<OperationSpec>,
pub records: Vec<RecordBrief>,
pub new_case: Vec<OperationKey>,
pub subjects: Vec<String>,
}Expand description
A workflow as understanding sees it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.key: WorkflowKeyIts key.
summary: Option<String>One line on what it is for.
glossary: Vec<GlossaryTerm>What its words mean.
startable: boolWhether a new case of it may be started.
operations: Vec<OperationSpec>Every operation offered on a record in view or on a new case, each once.
records: Vec<RecordBrief>The records in view.
new_case: Vec<OperationKey>The operations offered on a record that does not exist yet.
subjects: Vec<String>What a question about it may be about: its enumerations and stated fields.
Implementations§
Source§impl WorkflowBrief
impl WorkflowBrief
Sourcepub fn new(key: impl Into<WorkflowKey>) -> Self
pub fn new(key: impl Into<WorkflowKey>) -> Self
A workflow with nothing in view.
Sourcepub fn term(self, term: GlossaryTerm) -> Self
pub fn term(self, term: GlossaryTerm) -> Self
Adds a glossary term.
Sourcepub fn operation(self, spec: OperationSpec) -> Self
pub fn operation(self, spec: OperationSpec) -> Self
Adds an operation, stamped with this workflow.
Sourcepub fn record(self, record: RecordBrief) -> Self
pub fn record(self, record: RecordBrief) -> Self
Adds a record.
Sourcepub fn on_new_case(self, operation: impl Into<OperationKey>) -> Self
pub fn on_new_case(self, operation: impl Into<OperationKey>) -> Self
Offers an operation on a new case.
Sourcepub fn subject(self, subject: impl Into<String>) -> Self
pub fn subject(self, subject: impl Into<String>) -> Self
Adds a subject questions may be about.
Sourcepub fn spec(&self, key: &OperationKey) -> Option<&OperationSpec>
pub fn spec(&self, key: &OperationKey) -> Option<&OperationSpec>
The operation with this key.
Trait Implementations§
Source§impl Clone for WorkflowBrief
impl Clone for WorkflowBrief
Auto Trait Implementations§
impl !RefUnwindSafe for WorkflowBrief
impl !UnwindSafe for WorkflowBrief
impl Freeze for WorkflowBrief
impl Send for WorkflowBrief
impl Sync for WorkflowBrief
impl Unpin for WorkflowBrief
impl UnsafeUnpin for WorkflowBrief
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