Enum routing::Event [] [src]

pub enum Event {
    Request {
        request: Request,
        src: Authority,
        dst: Authority,
    },
    Response {
        response: Response,
        src: Authority,
        dst: Authority,
    },
    NodeAdded(XorNameRoutingTable<XorName>),
    NodeLost(XorNameRoutingTable<XorName>),
    Connected,
    RestartRequired,
    Terminate,
    Tick,
}

An Event raised by a Node or Client via its event sender.

These are sent by routing to the library's user. It allows the user to handle requests and responses, and to react to changes in the network.

Request and Response events from group authorities are only raised once the quorum has been reached, i. e. enough members of the group have sent the same message.

Variants

Request

Received a request message.

Fields

request: Request

The request message.

src: Authority

The source authority that sent the request.

dst: Authority

The destination authority that receives the request.

Response

Received a response message.

Fields

response: Response

The response message.

src: Authority

The source authority that sent the response.

dst: Authority

The destination authority that receives the response.

NodeAdded(XorNameRoutingTable<XorName>)

A new node joined the network and may be a member of group authorities we also belong to.

NodeLost(XorNameRoutingTable<XorName>)

A node left the network and may have been a member of group authorities we also belong to.

Connected

The client has successfully connected to a proxy node on the network.

RestartRequired

Disconnected or failed to connect - restart required.

Terminate

Startup failed - terminate.

Tick

This event is sent periodically every time Routing sends the Heartbeat messages.

Trait Implementations

impl PartialEq for Event
[src]

fn eq(&self, __arg_0: &Event) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Event) -> bool

This method tests for !=.

impl Eq for Event
[src]

impl Clone for Event
[src]

fn clone(&self) -> Event

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for Event
[src]

fn fmt(&self, formatter: &mut Formatter) -> Result

Formats the value using the given formatter.