Enum rings_node::prelude::Message
source · pub enum Message {
Show 15 variants
JoinDHT(JoinDHT),
LeaveDHT(LeaveDHT),
ConnectNodeSend(ConnectNodeSend),
ConnectNodeReport(ConnectNodeReport),
FindSuccessorSend(FindSuccessorSend),
FindSuccessorReport(FindSuccessorReport),
NotifyPredecessorSend(NotifyPredecessorSend),
NotifyPredecessorReport(NotifyPredecessorReport),
SearchVNode(SearchVNode),
FoundVNode(FoundVNode),
OperateVNode(VNodeOperation),
SyncVNodeWithSuccessor(SyncVNodeWithSuccessor),
CustomMessage(CustomMessage),
QueryForTopoInfoSend(QueryForTopoInfoSend),
QueryForTopoInfoReport(QueryForTopoInfoReport),
}
Expand description
A collection MessageType use for unified management.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
JoinDHT(JoinDHT)
Local message of Join a node to DHT
LeaveDHT(LeaveDHT)
Local message of drop a node from DHT
ConnectNodeSend(ConnectNodeSend)
Remote message of try connecting a node.
ConnectNodeReport(ConnectNodeReport)
Response of ConnectNodeSend
FindSuccessorSend(FindSuccessorSend)
Remote message of find successor
FindSuccessorReport(FindSuccessorReport)
Response of FindSuccessorSend
NotifyPredecessorSend(NotifyPredecessorSend)
Remote message of notify a predecessor
NotifyPredecessorReport(NotifyPredecessorReport)
Response of NotifyPredecessorSend
SearchVNode(SearchVNode)
Remote message of search a virtual node.
FoundVNode(FoundVNode)
Response when found a virtual node.
OperateVNode(VNodeOperation)
Remote message of operations of virtual node.
SyncVNodeWithSuccessor(SyncVNodeWithSuccessor)
Remote message for virtual node syncing.
CustomMessage(CustomMessage)
Custom messages
QueryForTopoInfoSend(QueryForTopoInfoSend)
Remote message of query topological info of a node.
QueryForTopoInfoReport(QueryForTopoInfoReport)
Response of QueryForTopoInfoSend
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Message, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Message, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Message> for Message
impl PartialEq<Message> for Message
source§impl Serialize for Message
impl Serialize for Message
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Message
impl StructuralEq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Upcastable for Twhere
T: Any + Send + Sync + 'static,
impl<T> Upcastable for Twhere T: Any + Send + Sync + 'static,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref