pub struct DhtConfig {
pub k_value: usize,
pub alpha: usize,
pub replication_factor: usize,
pub republish_interval: Duration,
pub node_expiration: Duration,
pub enable_delayed_lookups: bool,
pub lookup_delay_range: (u64, u64),
}Expand description
DHT configuration
Fields§
§k_value: usizeNumber of nodes per k-bucket
alpha: usizeNumber of parallel lookups (alpha)
replication_factor: usizeReplication parameter
republish_interval: DurationRepublish interval
node_expiration: DurationNode expiration time
enable_delayed_lookups: boolEnable delayed lookups (for stealth)
lookup_delay_range: (u64, u64)Lookup delay range (min, max) in milliseconds
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DhtConfig
impl<'de> Deserialize<'de> for DhtConfig
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 DhtConfig
impl RefUnwindSafe for DhtConfig
impl Send for DhtConfig
impl Sync for DhtConfig
impl Unpin for DhtConfig
impl UnsafeUnpin for DhtConfig
impl UnwindSafe for DhtConfig
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