pub enum PeerScoringEvent {
ThresholdCrossedDown {
member_id: Vec<u8>,
score: i64,
},
ThresholdCrossedUp {
member_id: Vec<u8>,
score: i64,
},
}Expand description
Event emitted by a super::PeerScoringPlugin when an apply call moves
a member across the configured threshold. Plug-ins return events from
every mutating call; the coordinator drains them at known safe
points and turns them into protocol actions (e.g. submitting
SCORE_BELOW_THRESHOLD). The score field carries the post-apply
value at the time of the cross.
“Untracked → tracked” via super::PeerScoringPlugin::add_member or a
super::PeerScoringPlugin::apply_snapshot entry counts as crossing
from above for cross-detection — a fresh entry that lands at-or-below
threshold emits ThresholdCrossedDown. Coordinators should treat
the events the same regardless of source.
Variants§
ThresholdCrossedDown
Member’s score moved from above-threshold to at-or-below threshold.
ThresholdCrossedUp
Member’s score moved from at-or-below threshold back above it. Reserved for future recovery-scoring use cases — coordinators today drop these silently.
Trait Implementations§
Source§impl Clone for PeerScoringEvent
impl Clone for PeerScoringEvent
Source§fn clone(&self) -> PeerScoringEvent
fn clone(&self) -> PeerScoringEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PeerScoringEvent
impl Debug for PeerScoringEvent
Source§impl PartialEq for PeerScoringEvent
impl PartialEq for PeerScoringEvent
Source§fn eq(&self, other: &PeerScoringEvent) -> bool
fn eq(&self, other: &PeerScoringEvent) -> bool
self and other values to be equal, and is used by ==.impl Eq for PeerScoringEvent
impl StructuralPartialEq for PeerScoringEvent
Auto Trait Implementations§
impl Freeze for PeerScoringEvent
impl RefUnwindSafe for PeerScoringEvent
impl Send for PeerScoringEvent
impl Sync for PeerScoringEvent
impl Unpin for PeerScoringEvent
impl UnsafeUnpin for PeerScoringEvent
impl UnwindSafe for PeerScoringEvent
Blanket Implementations§
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> 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