Enum message_io::node::NodeEvent [−][src]
pub enum NodeEvent<'a, S> {
Network(NetEvent<'a>),
Signal(S),
}
Expand description
Event returned by NodeListener::for_each()
and NodeListener::for_each_async()
when some network event or signal is received.
Variants
Network(NetEvent<'a>)
The NodeEvent
is an event that comes from the network.
See NetEvent
to know about the different network events.
Tuple Fields of Network
0: NetEvent<'a>
The NodeEvent
is a signal.
A signal is an event produced by the own node to itself.
You can send signals with timers or priority.
See EventSender
to know about how to send signals.
Implementations
Assume the event is a NodeEvent::Network
, panics if not.
Assume the event is a NodeEvent::Signal
, panics if not.