[−][src]Enum sn_routing::Event
An Event raised by a Node
or Client
via its event sender.
These are sent by sn_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 locations are only raised once the majority has
been reached, i.e. enough members of the section have sent the same message.
Variants
Received a message.
Fields of MessageReceived
content: Bytes
The content of the message.
src: SrcLocation
The source location that sent the message.
dst: DstLocation
The destination location that receives the message.
The node has been promoted to elder
The node has been promoted to adult
The node has been demoted from elder
A new peer joined our section.
Fields of MemberJoined
A node left our section.
The set of elders in our section has changed.
Fields of EldersChanged
This node has started relocating to other section. Will be followed by
Relocated
when the node finishes joining the destination section.
Fields of RelocationStarted
previous_name: XorName
Previous name before relocation
This node has completed relocation to other section.
Fields of Relocated
Disconnected or failed to connect - restart required.
Received a message from a client node.
Fields of ClientMessageReceived
content: Bytes
The content of the message.
src: SocketAddr
The address of the client that sent the message.
send: SendStream
Stream to send messages back to the client that sent the message
recv: RecvStream
Stream to receive more messages from the client on the same channel
ClientLost(SocketAddr)
Failed in sending a message to client, or connection to client is lost
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Event
[src]
impl Send for Event
[src]
impl Sync for Event
[src]
impl Unpin for Event
[src]
impl !UnwindSafe for Event
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,