pub struct RoutingConfig { /* private fields */ }Expand description
Configuration for the routing behaviour.
Implementations§
Source§impl Config
impl Config
Sourcepub const fn get_dht_random_walk(&self) -> bool
pub const fn get_dht_random_walk(&self) -> bool
Get DHT random walk.
Sourcepub const fn with_dht_random_walk(self, enable: bool) -> Self
pub const fn with_dht_random_walk(self, enable: bool) -> Self
Enables or disables random walks in the Kademlia DHT.
Sourcepub const fn get_discovery_limit(&self) -> u64
pub const fn get_discovery_limit(&self) -> u64
Get discovery limits.
Sourcepub const fn with_discovery_limit(self, num: u64) -> Self
pub const fn with_discovery_limit(self, num: u64) -> Self
Sets the number of active connections over which we interrupt the discovery process.
Sourcepub const fn get_allow_private_address_in_dht(&self) -> bool
pub const fn get_allow_private_address_in_dht(&self) -> bool
Get allow_local_address_in_dht.
Sourcepub const fn with_allow_private_address_in_dht(self, allow: bool) -> Self
pub const fn with_allow_private_address_in_dht(self, allow: bool) -> Self
Whether to allow local addresses in the DHT.
Sourcepub const fn get_allow_dns_address_in_dht(&self) -> bool
pub const fn get_allow_dns_address_in_dht(&self) -> bool
Get allow_dns_address_in_dht.
Sourcepub const fn with_allow_dns_address_in_dht(self, allow: bool) -> Self
pub const fn with_allow_dns_address_in_dht(self, allow: bool) -> Self
Whether to allow non-global addresses in the DHT.
Sourcepub const fn get_allow_loop_back_address_in_dht(&self) -> bool
pub const fn get_allow_loop_back_address_in_dht(&self) -> bool
Get allow_non_globals_in_dht.
Sourcepub const fn with_allow_loop_back_address_in_dht(self, allow: bool) -> Self
pub const fn with_allow_loop_back_address_in_dht(self, allow: bool) -> Self
Whether to allow non-global addresses in the DHT.
Sourcepub const fn get_kademlia_disjoint_query_paths(&self) -> bool
pub const fn get_kademlia_disjoint_query_paths(&self) -> bool
Get allow kademlia disjoint query paths
Sourcepub const fn with_kademlia_disjoint_query_paths(self, enable: bool) -> Self
pub const fn with_kademlia_disjoint_query_paths(self, enable: bool) -> Self
When enabled the number of disjoint paths used equals the configured parallelism.
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
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,
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