pub enum StateViolation<S: Storage = Heap> {
Mismatch {
at: Tick,
required: StateValue,
actual: StateValue,
requirer: ActivityId,
setter: Option<ActivityId>,
},
Conflict {
at: Tick,
setters: S::List<ActivityId>,
},
}Expand description
The first tick at which a state timeline is inconsistent, and why.
The setter list of a conflict uses the storage S of the timeline that reported it.
Variants§
Mismatch
A requirement sees a different value.
Fields
required: StateValueThe value the requirement needs.
actual: StateValueThe value the state has at at.
requirer: ActivityIdThe activity that holds the requirement. The smallest id if several fail at at;
for several failing requirements of that activity, required is the smallest value.
setter: Option<ActivityId>The activity whose set established actual, or None for the initial value.
The smallest id if several set the same value at the same tick.
Conflict
Activities set different values at the same tick, so the state there is ambiguous.
Reported whether or not a requirement depends on the value, because two commands that contradict each other at the same tick are a scheduling conflict in themselves.
Fields
setters: S::List<ActivityId>Every activity that sets a value at at. Sorted ascending, without duplicates.