Enum crust::Event [] [src]

pub enum Event<UID: Uid> {
    BootstrapAccept(UID, CrustUser),
    BootstrapConnect(UID, SocketAddr),
    BootstrapFailed,
    ListenerStarted(u16),
    ListenerFailed,
    ConnectionInfoPrepared(ConnectionInfoResult<UID>),
    ConnectSuccess(UID),
    ConnectFailure(UID),
    LostPeer(UID),
    NewMessage(UID, CrustUserVec<u8>),
    WriteMsgSizeProhibitive(UID, Vec<u8>),
}

Enum representing different events that will be sent over the asynchronous channel to the user of this module.

Variants

Invoked when a bootstrap peer connects to us

Invoked when we bootstrap to a new peer.

Invoked when we failed to connect to all bootstrap contacts.

Invoked when we are ready to listen for incomming connection. Contains the listening port.

Invoked when listener failed to start.

Invoked as a result to the call of Service::prepare_contact_info.

Invoked when connection to a new peer has been established.

Invoked when connection to a new peer has failed.

Invoked when a peer disconnects or can no longer be contacted.

Invoked when a new message is received. Passes the message.

Invoked when trying to sending a too large data.

Trait Implementations

impl<UID: Debug + Uid> Debug for Event<UID>
[src]

[src]

Formats the value using the given formatter.