pub struct SensorWaitFor {
pub run_of: Option<RunOf>,
pub event: Option<EventNamed>,
pub param: String,
pub timeout_ms: Option<u64>,
}Expand description
What an @sensor(wait_for=...) / @trigger(wait_for=...) waits for, and the parameter its
function is given it in (its first): a run of another DAG (RunOf, a RunResult) or an
event posted (EventNamed, an Event, decision 354); exactly one of the two.
Fields§
§run_of: Option<RunOf>The run, and of it which task.
event: Option<EventNamed>The event.
param: StringThe function’s parameter given the run.
timeout_ms: Option<u64>@sensor(wait_for=..., timeout=...): how long one call may take, in milliseconds; one
over it fails the attempt (its retries get the same run). None: what is left of
max_wait.
Implementations§
Source§impl SensorWaitFor
impl SensorWaitFor
Sourcepub const fn source(&self) -> Option<WaitSource<'_>>
pub const fn source(&self) -> Option<WaitSource<'_>>
What it waits for; None for neither or both (refused when the DAG is validated).
Trait Implementations§
Source§impl Clone for SensorWaitFor
impl Clone for SensorWaitFor
Source§fn clone(&self) -> SensorWaitFor
fn clone(&self) -> SensorWaitFor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SensorWaitFor
impl Debug for SensorWaitFor
Source§impl<'de> Deserialize<'de> for SensorWaitFor
impl<'de> Deserialize<'de> for SensorWaitFor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SensorWaitFor
Source§impl JsonSchema for SensorWaitFor
impl JsonSchema for SensorWaitFor
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for SensorWaitFor
impl PartialEq for SensorWaitFor
Source§impl Serialize for SensorWaitFor
impl Serialize for SensorWaitFor
impl StructuralPartialEq for SensorWaitFor
Auto Trait Implementations§
impl Freeze for SensorWaitFor
impl RefUnwindSafe for SensorWaitFor
impl Send for SensorWaitFor
impl Sync for SensorWaitFor
impl Unpin for SensorWaitFor
impl UnsafeUnpin for SensorWaitFor
impl UnwindSafe for SensorWaitFor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more