Enum routing::Event
[−]
[src]
pub enum Event { Request { request: Request, src: Authority<XorName>, dst: Authority<XorName>, }, Response { response: Response, src: Authority<XorName>, dst: Authority<XorName>, }, NodeAdded(XorName, RoutingTable<XorName>), NodeLost(XorName, RoutingTable<XorName>), SectionSplit(Prefix<XorName>), SectionMerge(Prefix<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 section authorities are only raised once the quorum has
been reached, i.e. enough members of the section have sent the same message.
Variants
Request
Received a request message.
Fields of Request
request: Request | The request message. |
src: Authority<XorName> | The source authority that sent the request. |
dst: Authority<XorName> | The destination authority that receives the request. |
Response
Received a response message.
Fields of Response
response: Response | The response message. |
src: Authority<XorName> | The source authority that sent the response. |
dst: Authority<XorName> | The destination authority that receives the response. |
NodeAdded(XorName, RoutingTable<XorName>)
A node has connected to us.
NodeLost(XorName, RoutingTable<XorName>)
A node has disconnected from us.
SectionSplit(Prefix<XorName>)
Our own section has been split, resulting in the included Prefix
for our new section.
SectionMerge(Prefix<XorName>)
Our own section requires merged with others, resulting in the included Prefix
for our new
section.
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 Clone for Event
[src]
fn clone(&self) -> Event
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Event
[src]
impl PartialEq for Event
[src]
fn eq(&self, __arg_0: &Event) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Event) -> bool
[src]
This method tests for !=
.