pub struct ReputationConfig {
pub trust_threshold: f64,
pub bad_peer_threshold: f64,
pub transfer_success_weight: f64,
pub latency_weight: f64,
pub protocol_compliance_weight: f64,
pub uptime_weight: f64,
pub max_tracked_peers: usize,
pub retention_period: Duration,
pub score_decay_rate: f64,
pub ema_alpha: f64,
}Expand description
Configuration for the reputation system
Fields§
§trust_threshold: f64Minimum score to be considered trusted (0.0-1.0)
bad_peer_threshold: f64Score below which a peer is considered bad (0.0-1.0)
transfer_success_weight: f64Weight for transfer success rate (0.0-1.0)
latency_weight: f64Weight for latency score (0.0-1.0)
protocol_compliance_weight: f64Weight for protocol compliance (0.0-1.0)
uptime_weight: f64Weight for uptime score (0.0-1.0)
max_tracked_peers: usizeMaximum number of peers to track
retention_period: DurationHow long to remember peer reputation after last interaction
score_decay_rate: f64Decay factor for old scores (0.0-1.0, higher = faster decay)
ema_alpha: f64Exponential moving average alpha for score updates (0.0-1.0)
Implementations§
Trait Implementations§
Source§impl Clone for ReputationConfig
impl Clone for ReputationConfig
Source§fn clone(&self) -> ReputationConfig
fn clone(&self) -> ReputationConfig
Returns a duplicate 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 ReputationConfig
impl Debug for ReputationConfig
Auto Trait Implementations§
impl Freeze for ReputationConfig
impl RefUnwindSafe for ReputationConfig
impl Send for ReputationConfig
impl Sync for ReputationConfig
impl Unpin for ReputationConfig
impl UnwindSafe for ReputationConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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