#[non_exhaustive]pub struct ClaimModel {
pub workflow: ClaimWorkflow,
}Expand description
The exploration model of the claim workflow.
Every value comes from a fixed table and the proposals are two constants, so the reachable state space is finite and identical on every run. The model deliberately offers a refused command in each phase, since the explorer checks that a refusal changes nothing.
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.workflow: ClaimWorkflowThe definition transitions are applied through.
Implementations§
Source§impl ClaimModel
impl ClaimModel
Trait Implementations§
Source§impl Clone for ClaimModel
impl Clone for ClaimModel
impl Copy for ClaimModel
Source§impl Debug for ClaimModel
impl Debug for ClaimModel
Source§impl Default for ClaimModel
impl Default for ClaimModel
Source§impl WorkflowModel<ClaimWorkflow> for ClaimModel
impl WorkflowModel<ClaimWorkflow> for ClaimModel
Source§fn initial_states(&self) -> Vec<Option<ClaimState>>
fn initial_states(&self) -> Vec<Option<ClaimState>>
The states exploration starts from.
None means “the case does not
exist yet”, which is where most workflows begin — and it never means
“the case is over”, because a case’s identity outlives its content.Source§fn candidate_commands(&self, state: Option<&ClaimState>) -> Vec<ClaimCommand>
fn candidate_commands(&self, state: Option<&ClaimState>) -> Vec<ClaimCommand>
Commands worth trying in this state, in a stable order. Include commands
you expect to be refused: the explorer checks that a refusal changes
nothing.
Source§fn simulate(
&self,
state: Option<&ClaimState>,
command: &ClaimCommand,
) -> SimulatedTransition<ClaimState, ClaimEvent>
fn simulate( &self, state: Option<&ClaimState>, command: &ClaimCommand, ) -> SimulatedTransition<ClaimState, ClaimEvent>
Applies one candidate command purely.
Source§fn declared_outcomes(&self) -> Vec<ClaimOutcome>
fn declared_outcomes(&self) -> Vec<ClaimOutcome>
Outcomes the workflow claims it can reach. The explorer reports every
declared outcome no reachable state projects. The default is empty,
which disables the check.
Auto Trait Implementations§
impl Freeze for ClaimModel
impl RefUnwindSafe for ClaimModel
impl Send for ClaimModel
impl Sync for ClaimModel
impl Unpin for ClaimModel
impl UnsafeUnpin for ClaimModel
impl UnwindSafe for ClaimModel
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