#[non_exhaustive]pub struct RecordBrief {
pub token: TargetToken,
pub label: String,
pub phase: String,
pub fields: Vec<StateField>,
pub obligations: Vec<String>,
pub briefing: Option<String>,
pub operations: Vec<OperationKey>,
}Expand description
A record in view.
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.token: TargetTokenThe token it is named by.
label: StringServer-authored label.
phase: StringIts phase, as the workflow names it.
fields: Vec<StateField>What it holds, as the workflow says it may be stated.
obligations: Vec<String>What it still needs, as sentences.
briefing: Option<String>The workflow’s guidance for a turn about a record in this phase.
operations: Vec<OperationKey>The operations offered on it now.
Implementations§
Source§impl RecordBrief
impl RecordBrief
Sourcepub fn new(
token: impl Into<TargetToken>,
label: impl Into<String>,
phase: impl Into<String>,
) -> Self
pub fn new( token: impl Into<TargetToken>, label: impl Into<String>, phase: impl Into<String>, ) -> Self
A record with its token, label and phase.
Sourcepub fn field(self, field: StateField) -> Self
pub fn field(self, field: StateField) -> Self
Adds a field.
Sourcepub fn obligation(self, sentence: impl Into<String>) -> Self
pub fn obligation(self, sentence: impl Into<String>) -> Self
Adds an open obligation.
Sourcepub fn offers(&self, operation: &OperationKey) -> bool
pub fn offers(&self, operation: &OperationKey) -> bool
Whether operation is offered on it.
Trait Implementations§
Source§impl Clone for RecordBrief
impl Clone for RecordBrief
Auto Trait Implementations§
impl Freeze for RecordBrief
impl RefUnwindSafe for RecordBrief
impl Send for RecordBrief
impl Sync for RecordBrief
impl Unpin for RecordBrief
impl UnsafeUnpin for RecordBrief
impl UnwindSafe for RecordBrief
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