pub struct AdaptiveDhtConfig {
pub swap_threshold: f64,
}Expand description
Configuration for the AdaptiveDHT layer
Fields§
§swap_threshold: f64Trust score below which a peer becomes eligible for swap-out from the routing table when a better candidate is available. Peers are NOT immediately evicted. Default: 0.35
Implementations§
Trait Implementations§
Source§impl Clone for AdaptiveDhtConfig
impl Clone for AdaptiveDhtConfig
Source§fn clone(&self) -> AdaptiveDhtConfig
fn clone(&self) -> AdaptiveDhtConfig
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 AdaptiveDhtConfig
impl Debug for AdaptiveDhtConfig
Source§impl Default for AdaptiveDhtConfig
impl Default for AdaptiveDhtConfig
Source§impl<'de> Deserialize<'de> for AdaptiveDhtConfigwhere
AdaptiveDhtConfig: Default,
impl<'de> Deserialize<'de> for AdaptiveDhtConfigwhere
AdaptiveDhtConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AdaptiveDhtConfig
impl RefUnwindSafe for AdaptiveDhtConfig
impl Send for AdaptiveDhtConfig
impl Sync for AdaptiveDhtConfig
impl Unpin for AdaptiveDhtConfig
impl UnsafeUnpin for AdaptiveDhtConfig
impl UnwindSafe for AdaptiveDhtConfig
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