pub struct NetworkConfig {
pub min_delay: Duration,
pub max_delay: Duration,
pub quality_bad_threshold: f64,
pub quality_offline_threshold: f64,
pub node_score_auto_path_threshold: f64,
pub max_first_hop_latency_threshold: Option<Duration>,
pub quality_step: f64,
pub quality_avg_window_size: u32,
pub ignore_timeframe: Duration,
pub backoff_exponent: f64,
pub backoff_min: f64,
pub backoff_max: f64,
}
Expand description
Configuration for the crate::network::Network
object
Fields§
§min_delay: Duration
Minimum delay will be multiplied by backoff, it will be half the actual minimum value
max_delay: Duration
Maximum delay
quality_bad_threshold: f64
§quality_offline_threshold: f64
§node_score_auto_path_threshold: f64
§max_first_hop_latency_threshold: Option<Duration>
§quality_step: f64
§quality_avg_window_size: u32
§ignore_timeframe: Duration
§backoff_exponent: f64
§backoff_min: f64
§backoff_max: f64
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
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 NetworkConfig
impl Debug for NetworkConfig
Source§impl Default for NetworkConfig
impl Default for NetworkConfig
Source§fn default() -> Self
fn default() -> Self
Return NetworkConfig { min_delay: duration_1_s(), max_delay: duration_5_min(), quality_bad_threshold: quality_bad_threshold(), quality_offline_threshold: quality_offline_threshold(), node_score_auto_path_threshold: node_score_auto_path_threshold(), max_first_hop_latency_threshold: max_first_hop_latency_threshold(), quality_step: quality_step(), quality_avg_window_size: quality_average_window_size(), ignore_timeframe: duration_2_min(), backoff_exponent: backoff_exponent(), backoff_min: backoff_min(), backoff_max: backoff_max() }
Source§impl<'de> Deserialize<'de> for NetworkConfig
impl<'de> Deserialize<'de> for NetworkConfig
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
Source§impl PartialEq for NetworkConfig
impl PartialEq for NetworkConfig
Source§impl Serialize for NetworkConfig
impl Serialize for NetworkConfig
impl StructuralPartialEq for NetworkConfig
Auto Trait Implementations§
impl Freeze for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnwindSafe for NetworkConfig
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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