pub enum SpoolChange {
Load {
tool: i64,
event: EventDraft,
},
Unload {
event: EventDraft,
},
SetRemaining {
remaining_g: f64,
event: EventDraft,
},
MarkUnverified {
reason: UnverifiedReason,
event: EventDraft,
},
ClearMarks {
kinds: Vec<UnverifiedReasonKind>,
},
Retire {
event: EventDraft,
},
}Expand description
What one SpoolMutation changes, each change that writes an event
carrying it and the one that writes none carrying none.
Variants§
Load
Put the spool on a tool.
Unload
Take the spool off its tool.
Fields
event: EventDraftIts spool_unloaded event.
SetRemaining
Set the spool’s remaining figure, which clears every mark: the spool
reads verified after it.
MarkUnverified
Add one mark, by SpoolTrust::marked, at the mutation’s instant.
A reason the spool already holds changes nothing, so it is a no-op: the
spool is not written and its event is not appended, which is how a
second signal of one change writes no second spool_unverified.
Fields
reason: UnverifiedReasonWhy the figure is in doubt.
event: EventDraftIts spool_unverified event, appended only when the mark is new.
ClearMarks
Remove every mark of these kinds, by SpoolTrust::cleared. The
domain chooses the kinds through
marks_cleared_by, and the marks
cleared are named in the command’s own event, so this change carries
and writes no event of its own.
Fields
kinds: Vec<UnverifiedReasonKind>The kinds of mark removed.
Retire
Retire the spool, which takes it off any tool it is loaded on.
Fields
event: EventDraftIts spool_retired event.