Enum libp2p_kad::kbucket::UpdateOutcome
source · pub enum UpdateOutcome<Id, Val> {
Added,
Refreshed(Val),
NeedPing(Id),
Discarded,
FailSelfUpdate,
}
Expand description
Return value of the update()
method.
Variants
Added
The node has been added to the bucket.
Refreshed(Val)
The node was already in the bucket and has been refreshed.
NeedPing(Id)
The node wasn’t added. Instead we need to ping the node passed as parameter, and call
update
if it responds.
Discarded
The node wasn’t added at all because a node was already pending.
FailSelfUpdate
Tried to update the local peer ID. This is an invalid operation.
Trait Implementations
sourceimpl<Id: Clone, Val: Clone> Clone for UpdateOutcome<Id, Val>
impl<Id: Clone, Val: Clone> Clone for UpdateOutcome<Id, Val>
sourcefn clone(&self) -> UpdateOutcome<Id, Val>
fn clone(&self) -> UpdateOutcome<Id, Val>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<Id: Debug, Val: Debug> Debug for UpdateOutcome<Id, Val>
impl<Id: Debug, Val: Debug> Debug for UpdateOutcome<Id, Val>
sourceimpl<Id: PartialEq, Val: PartialEq> PartialEq<UpdateOutcome<Id, Val>> for UpdateOutcome<Id, Val>
impl<Id: PartialEq, Val: PartialEq> PartialEq<UpdateOutcome<Id, Val>> for UpdateOutcome<Id, Val>
sourcefn eq(&self, other: &UpdateOutcome<Id, Val>) -> bool
fn eq(&self, other: &UpdateOutcome<Id, Val>) -> bool
impl<Id: Copy, Val: Copy> Copy for UpdateOutcome<Id, Val>
impl<Id: Eq, Val: Eq> Eq for UpdateOutcome<Id, Val>
impl<Id, Val> StructuralEq for UpdateOutcome<Id, Val>
impl<Id, Val> StructuralPartialEq for UpdateOutcome<Id, Val>
Auto Trait Implementations
impl<Id, Val> RefUnwindSafe for UpdateOutcome<Id, Val>where
Id: RefUnwindSafe,
Val: RefUnwindSafe,
impl<Id, Val> Send for UpdateOutcome<Id, Val>where
Id: Send,
Val: Send,
impl<Id, Val> Sync for UpdateOutcome<Id, Val>where
Id: Sync,
Val: Sync,
impl<Id, Val> Unpin for UpdateOutcome<Id, Val>where
Id: Unpin,
Val: Unpin,
impl<Id, Val> UnwindSafe for UpdateOutcome<Id, Val>where
Id: UnwindSafe,
Val: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more