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,
}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::RemoteAction. Other dids are the fields declared in 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
Trait Implementations§
source§impl Clone for RemoteAction
impl Clone for RemoteAction
source§fn clone(&self) -> RemoteAction
fn clone(&self) -> RemoteAction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RemoteAction
impl Debug for RemoteAction
source§impl PartialEq<RemoteAction> for RemoteAction
impl PartialEq<RemoteAction> for RemoteAction
source§fn eq(&self, other: &RemoteAction) -> bool
fn eq(&self, other: &RemoteAction) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for RemoteAction
impl StructuralEq for RemoteAction
impl StructuralPartialEq for RemoteAction
Auto Trait Implementations§
impl RefUnwindSafe for RemoteAction
impl Send for RemoteAction
impl Sync for RemoteAction
impl Unpin for RemoteAction
impl UnwindSafe for RemoteAction
Blanket Implementations§
§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> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'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,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
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.