pub enum Trigger {
Any,
All,
One(HandleId),
AllOf(HandleSet),
AnyOf(HandleSet),
Always,
Predicate(fn(&ReadinessSnapshot) -> bool),
RawPredicate {
callback: unsafe extern "C" fn(*const bool, usize, *mut c_void) -> bool,
context: *mut c_void,
},
}Expand description
Executor-level trigger condition.
Controls when the executor dispatches callbacks during spin_once().
The trigger is evaluated after polling the transport but before any
callback dispatch.
Variants§
Any
Fire if any registered handle has data (default).
All
Fire only when ALL non-timer handles have data.
One(HandleId)
Fire only when a specific handle has data.
AllOf(HandleSet)
Fire only when every handle in the set has data.
AnyOf(HandleSet)
Fire when any handle in the set has data.
Always
Always fire, regardless of data availability.
Predicate(fn(&ReadinessSnapshot) -> bool)
Custom predicate over a readiness snapshot.
RawPredicate
Custom predicate with C-compatible signature and context pointer.
The callback receives a bool array of readiness flags (one per handle),
the count of handles, and a user-provided context pointer.
Used by the C API to bridge nros_executor_trigger_t to the Rust trigger system.