pub struct Config { /* private fields */ }Expand description
Dht lookup config
Note that while transient, parallelism and alpha are parameters that you can modify to suit your needs, you very rarely want to modify the k parameter.
Implementations§
Source§impl Config
impl Config
Sourcepub fn transient() -> Self
pub fn transient() -> Self
Configuration for a transient node that does not want to be included in the routing tables of its peers.
Sourcepub fn persistent() -> Self
pub fn persistent() -> Self
Configuration for a persistent node that wants to be included in the routing tables of its peers.
pub fn candidate_lookup_strategy(self, value: CandidateLookupStrategy) -> Self
pub fn random_lookup_strategy(self, value: RandomLookupStrategy) -> Self
pub fn self_lookup_strategy(self, value: SelfLookupStrategy) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.