#[non_exhaustive]pub enum Event {
Input {
id: DataId,
meta: Metadata,
data: Payload,
},
InputClosed {
id: DataId,
source: PortRef,
reason: RouteCloseReason,
},
InputRecovered {
id: DataId,
source: PortRef,
generation: u64,
},
Stop(StopCause),
Reload {
operator: Option<OperatorId>,
path: Option<String>,
},
AllInputsClosed,
ParamUpdate {
scope: ParamScope,
key: ParamKey,
value: Parameter,
},
ParamDeleted {
scope: ParamScope,
key: ParamKey,
},
NodeFailed {
peer: NodeId,
cause: NodeExitCause,
},
Restarted {
peer: NodeId,
generation: u64,
},
ExtDropped {
key: ExtensionKey,
reason: String,
},
Error(String),
}Expand description
One thing that happened to this node.
Event::Input carries exactly the three fields blueprint §9.1
destructures — { id, data, meta } — so the example there compiles
verbatim. The producer port behind an input is a property of the node’s
wiring rather than of the message, and is available from
crate::Node::input_source.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Input
A message arrived on one of the node’s inputs.
Fields
InputClosed
An input will receive nothing further.
Fields
reason: RouteCloseReasonWhy it closed.
InputRecovered
A closed input is live again, because its producer restarted (§12).
Fields
Stop(StopCause)
Finish up and exit. The stream fuses after this.
Reload
Reload the node’s code, or one operator inside it (§9.3).
Fields
operator: Option<OperatorId>The operator to reload, or None for the whole node.
AllInputsClosed
Every input of this node has closed.
ParamUpdate
A parameter this node reads was written (§17 param set).
Fields
scope: ParamScopeThe scope it was written in.
ParamDeleted
A parameter this node reads was deleted.
NodeFailed
A peer node failed (§12).
Restarted
A peer node was restarted under its restart policy (§12).
ExtDropped
An extension entry this node owned was dropped.
Error(String)
The session hit a condition the node should know about but that does not end it — a queue overflow, an undecodable frame, a route the node could not map.
Implementations§
Source§impl Event
impl Event
Sourcepub const fn input(&self) -> Option<&DataId>
pub const fn input(&self) -> Option<&DataId>
The input this event concerns, when it concerns one.
Sourcepub const fn is_control(&self) -> bool
pub const fn is_control(&self) -> bool
Whether this event travels on the control lane (§11.3).
Sourcepub const fn metadata(&self) -> Option<&Metadata>
pub const fn metadata(&self) -> Option<&Metadata>
The metadata this event carries, when it carries any.
Sourcepub const fn payload(&self) -> Option<&Payload>
pub const fn payload(&self) -> Option<&Payload>
The payload this event carries, when it carries one.