ActionError
pub struct ActionError
An action that could not be carried out.
Reported separately from the alarm because the two are different facts: an alarm is a fact about the world, a failed snapshot is a fact about the disk. An action failing never changes an alarm's state and never interrupts frame processing.
ActionError — fields
rule_id: u64
Which rule's action failed.
action_index: u32
Its position in that rule's action list.
path: String
The file it was trying to write, if any.
message: String
What went wrong.
sequence: u64
The causing alarm event's sequence, carried through unchanged.
The field to correlate on, as on ActionCompleted::sequence: a
failed still has no file, so neither the path nor the rule and a
nearby time can say which activation failed.
ActionError — methods
pub fn blank() -> Result<Self>
The SDK's own defaulted record, for a test.
These arrive from a callback, so until now there was no way to
build one -- and an application cannot test its own
crate::Camera::on_action_error handler without a record to
hand it.
Built through optris_sdk_action_error_init rather than from
Rust zeros, for the reason the header gives every _init: the
neutral value of each field is the SDK's to define, and a
field that starts defaulting to something other than zero
would make a hand-written default wrong in silence. Assign
over whatever your test needs to be different.
Errors
Returns crate::Status::InvalidArgument only if the library
does not recognise this crate's idea of the struct's size.