Enum comm::client::Event [] [src]

pub enum Event {
    ReceivedTextMessage(TextMessage),
    SentTextMessage(TextMessage),
    ReceivedMessageAcknowledgement(MessageAcknowledgement),
    Shutdown,
    Started,
}

Events emitted to any listeners registered with register_event_listener. They represent various client-level events.

Variants

We've received a message that was addressed to us

We've sent or relayed a message

We've received an acknowledgement for a message we sent

The client has shut down

TODO: It might be useful for Shutdown to contain the serialized state of the entire Client, Network, RoutingTable, Buckets and Nodes so that a user may store it and later re-initialize a Client with this state in order to prevent re-bootstrapping from scratch.

Network has started running. This does not necessary guarantee that we are "connected" to the network, because we haven't necessarily sent/received any messages. It just indicates that the Network is open for business.

Trait Implementations

impl Clone for Event
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Event
[src]

[src]

Formats the value using the given formatter. Read more