ActionCompleted
pub struct ActionCompleted
An action that has done its work, whatever that turned out to be.
The counterpart to ActionError, delivered on the same thread
and under the same rule: an action's fate never changes an alarm's
state and never interrupts frame processing.
This is the only way to learn that an alarm's snapshot reached the disk. Three outcomes were invisible in three different ways before it existed: a written file said nothing at all, a skipped snapshot returned silently, and one dropped from a full queue was counted where nothing outside the SDK could read the count.
ActionCompleted — fields
rule_id: u64
Whose action this was.
action_index: u32
Its position in that rule's action list.
outcome: ActionOutcome
What happened.
path: String
The file that was written, for ActionOutcome::Written, and
empty for every other outcome.
timestamp_us: u64
The causing alarm event's timestamp_us, carried through
unchanged. Monotonic, and comparable only against other events
of the same rule.
sequence: u64
The causing alarm event's sequence, carried through
unchanged. This is the field to correlate on.
ActionCompleted — methods
pub fn blank() -> Result<Self>
The SDK's own defaulted record, for a test.
The counterpart of ActionError::blank, and here the
default is a decision rather than a zero fill:
optris_sdk_action_completed_init is documented to leave the
outcome at ActionOutcome::Unknown. A record built from
Rust zeros would have to know that, and would be wrong the day
it changes.