Enum nakamoto_net::Io

source ·
pub enum Io<M, E, D, Id: PeerId = SocketAddr> {
    Write(Id, M),
    Connect(Id),
    Disconnect(Id, D),
    SetTimer(LocalDuration),
    Event(E),
}
Expand description

Output of a state transition of the state machine.

Variants

Write(Id, M)

There are some bytes ready to be sent to a peer.

Connect(Id)

Connect to a peer.

Disconnect(Id, D)

Disconnect from a peer.

SetTimer(LocalDuration)

Ask for a wakeup in a specified amount of time.

Event(E)

Emit an event.

Trait Implementations

Formats the value using the given formatter. Read more

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.

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.