pub enum TrustEvent {
ConnectionFailed,
ConnectionTimeout,
ApplicationSuccess(f64),
ApplicationFailure(f64),
}Expand description
Trust-relevant events for peer scoring.
Core only records penalties — successful responses are the expected
baseline and do not warrant a reward. Positive trust signals are the
consumer’s responsibility via ApplicationSuccess.
Consumer-reported events carry a weight multiplier that controls the
severity of the update (clamped to MAX_CONSUMER_WEIGHT).
Variants§
ConnectionFailed
Could not establish a connection to the peer
ConnectionTimeout
Connection attempt timed out
ApplicationSuccess(f64)
Consumer-reported: peer completed an application-level task successfully. Weight controls severity (clamped to MAX_CONSUMER_WEIGHT).
ApplicationFailure(f64)
Consumer-reported: peer failed an application-level task. Weight controls severity (clamped to MAX_CONSUMER_WEIGHT).
Trait Implementations§
Source§impl Clone for TrustEvent
impl Clone for TrustEvent
Source§fn clone(&self) -> TrustEvent
fn clone(&self) -> TrustEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TrustEvent
Source§impl Debug for TrustEvent
impl Debug for TrustEvent
Source§impl PartialEq for TrustEvent
impl PartialEq for TrustEvent
Source§fn eq(&self, other: &TrustEvent) -> bool
fn eq(&self, other: &TrustEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TrustEvent
Auto Trait Implementations§
impl Freeze for TrustEvent
impl RefUnwindSafe for TrustEvent
impl Send for TrustEvent
impl Sync for TrustEvent
impl Unpin for TrustEvent
impl UnsafeUnpin for TrustEvent
impl UnwindSafe for TrustEvent
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
Mutably borrows from an owned value. Read more