[][src]Enum quic_p2p::Event

pub enum Event {
    BootstrapFailure,
    BootstrappedTo {
        node: SocketAddr,
    },
    ConnectionFailure {
        peer: Peer,
        err: QuicP2pError,
    },
    SentUserMessage {
        peer: Peer,
        msg: Bytes,
        token: Token,
    },
    UnsentUserMessage {
        peer: Peer,
        msg: Bytes,
        token: Token,
    },
    ConnectedTo {
        peer: Peer,
    },
    NewMessage {
        peer: Peer,
        msg: Bytes,
    },
    Finish,
}

QuicP2p Events to the user

Variants

BootstrapFailure

Network bootstrap failed.

BootstrappedTo

Bootstrap connection to this node was successful.

Fields of BootstrappedTo

node: SocketAddr

Node information.

ConnectionFailure

Connection to this peer failed.

Fields of ConnectionFailure

peer: Peer

Peer.

err: QuicP2pError

Error explaining connection failure.

SentUserMessage

The given message was successfully sent to this peer.

Fields of SentUserMessage

peer: Peer

Peer.

msg: Bytes

Sent message.

token: Token

Token, originally given by the user, for context.

UnsentUserMessage

The given message was not sent to this peer.

Fields of UnsentUserMessage

peer: Peer

Peer.

msg: Bytes

Unsent message.

token: Token

Token, originally given by the user, for context.

ConnectedTo

Successfully connected to this peer.

Fields of ConnectedTo

peer: Peer

Peer information.

NewMessage

A new message was received from this peer.

Fields of NewMessage

peer: Peer

Sending peer.

msg: Bytes

The new message.

Finish

No more messages will be fired after this

Trait Implementations

impl Debug for Event[src]

impl Display for Event[src]

Auto Trait Implementations

impl !RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl !UnwindSafe for Event

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> ToString for T where
    T: Display + ?Sized
[src]

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>,