Enum rings_core::dht::PeerRingRemoteAction
source · pub enum PeerRingRemoteAction {
FindSuccessor(Did),
FindVNode(Did),
FindVNodeForOperate(VNodeOperation),
Notify(Did),
SyncVNodeWithSuccessor(Vec<VirtualNode>),
FindSuccessorForConnect(Did),
FindSuccessorForFix(Did),
CheckPredecessor,
QueryForSuccessorList,
QueryForSuccessorListAndPred,
TryConnect,
}Expand description
Some of the process needs to be done remotely. This enum is used to describe that.
Don’t worry about leaving the context. There will be callback machinisim externally
that will invoke appropriate methods in PeerRing to continue the process.
To avoid ambiguity, in the following comments, did_a is the Did declared in
PeerRingAction. Other dids are the fields declared in this RemoteAction.
Variants§
FindSuccessor(Did)
Need did_a to find did_b.
FindVNode(Did)
Need did_a to find virtual node did_b.
FindVNodeForOperate(VNodeOperation)
Need did_a to find VirtualNode for operating.
Notify(Did)
Let did_a notify did_b.
SyncVNodeWithSuccessor(Vec<VirtualNode>)
Let did_a sync data with it’s successor.
FindSuccessorForConnect(Did)
Need did_a to find did_b then send back with for connect flag.
FindSuccessorForFix(Did)
Need did_a to find did_b then send back with for finger table fixing flag.
CheckPredecessor
Check predecessor
QueryForSuccessorList
Fetch successor_list from successor
QueryForSuccessorListAndPred
Fetch successor_list and pred from successor
TryConnect
Try connect to a Node
Trait Implementations§
source§impl Clone for RemoteAction
impl Clone for RemoteAction
source§fn clone(&self) -> RemoteAction
fn clone(&self) -> RemoteAction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for RemoteAction
impl Debug for RemoteAction
source§impl PartialEq for RemoteAction
impl PartialEq for RemoteAction
source§fn eq(&self, other: &RemoteAction) -> bool
fn eq(&self, other: &RemoteAction) -> bool
self and other values to be equal, and is used
by ==.impl Eq for RemoteAction
impl StructuralPartialEq for RemoteAction
Auto Trait Implementations§
impl Freeze for RemoteAction
impl RefUnwindSafe for RemoteAction
impl Send for RemoteAction
impl Sync for RemoteAction
impl Unpin for RemoteAction
impl UnwindSafe for RemoteAction
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more