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.

Signal(S)

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.

Trait Implementations

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.