Enum vapcore_network::NetworkIoMessage[][src]

pub enum NetworkIoMessage {
    AddHandler {
        handler: Arc<dyn NetworkProtocolHandler + Sync>,
        protocol: ProtocolId,
        versions: Vec<(u8, u8)>,
    },
    AddTimer {
        protocol: ProtocolId,
        token: TimerToken,
        delay: Duration,
    },
    InitPublicInterface,
    Disconnect(PeerId),
    DisablePeer(PeerId),
    NetworkStarted(String),
}

Messages used to communicate with the event loop from other threads.

Variants

AddHandler

Register a new protocol handler.

Fields of AddHandler

handler: Arc<dyn NetworkProtocolHandler + Sync>

Handler shared instance.

protocol: ProtocolId

Protocol Id.

versions: Vec<(u8, u8)>

Supported protocol versions and number of packet IDs reserved by the protocol (packet count).

AddTimer

Register a new protocol timer

Fields of AddTimer

protocol: ProtocolId

Protocol Id.

token: TimerToken

Timer token.

delay: Duration

Timer delay.

InitPublicInterface

Initliaze public interface.

Disconnect(PeerId)

Disconnect a peer.

DisablePeer(PeerId)

Disconnect and temporary disable peer.

NetworkStarted(String)

Network has been started with the host as the given enode.

Trait Implementations

impl Clone for NetworkIoMessage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,