pub struct MeshRelayConfig {Show 17 fields
pub max_ttl: u8,
pub dense_max_ttl: u8,
pub dense_degree: usize,
pub fanout: usize,
pub jitter_min: Duration,
pub jitter_max: Duration,
pub rate_per_sec: f32,
pub burst: f32,
pub peer_rate_per_sec: f32,
pub peer_burst: f32,
pub queue_capacity: usize,
pub seen: RelaySeenConfig,
pub bias_min_scale: f32,
pub bias_max_handicap: Duration,
pub activity_window: Duration,
pub activity_min_forwards: u64,
pub activity_idle_windows: u32,
}Expand description
Tunables for mesh forwarding.
Fields§
§max_ttl: u8Hop budget a forwarded frame is clamped to.
dense_max_ttl: u8Hop budget applied once the neighborhood is dense.
dense_degree: usizeNeighbor count at which the dense budget applies.
fanout: usizeNeighbors a frame is forwarded to.
jitter_min: DurationShortest pre-transmit delay.
jitter_max: DurationLongest pre-transmit delay at low density.
rate_per_sec: f32Sustained forwarding rate, frames per second.
burst: f32Burst allowance above the sustained rate.
peer_rate_per_sec: f32Sustained per-neighbor acceptance rate.
peer_burst: f32Per-neighbor burst allowance.
queue_capacity: usizeMaximum forwards awaiting transmission.
seen: RelaySeenConfigSuppression cache sizing.
bias_min_scale: f32Smallest share of the full forwarding effort capability bias scales a
device down to. 1.0 disables bias: every device forwards as eagerly
as every other, whatever its battery.
bias_max_handicap: DurationLongest extra pre-transmit delay bias adds to a weaker device.
activity_window: DurationHow long a stretch of forwarding activity is measured over.
activity_min_forwards: u64Frames carried within one window at or above which this device reads as an active relay.
activity_idle_windows: u32Consecutive quiet windows before an active relay reads as inactive.
Trait Implementations§
Source§impl Clone for MeshRelayConfig
impl Clone for MeshRelayConfig
Source§fn clone(&self) -> MeshRelayConfig
fn clone(&self) -> MeshRelayConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MeshRelayConfig
impl Debug for MeshRelayConfig
Auto Trait Implementations§
impl Freeze for MeshRelayConfig
impl RefUnwindSafe for MeshRelayConfig
impl Send for MeshRelayConfig
impl Sync for MeshRelayConfig
impl Unpin for MeshRelayConfig
impl UnsafeUnpin for MeshRelayConfig
impl UnwindSafe for MeshRelayConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
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> ⓘ
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> ⓘ
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