pub struct BandwidthConfig {
pub target_bytes_per_sec: u32,
}Expand description
Per-connection outbound bandwidth budget. Applied symmetrically to server-outbound and client-outbound send loops.
Not to be confused with ConnectionConfig::bandwidth_measure_duration,
which is a telemetry/averaging window — this is the actual token-bucket cap
consumed by the unified priority-sort send loop.
Fields§
§target_bytes_per_sec: u32Target outbound bytes-per-second per connection. Budget accumulates as
target_bytes_per_sec × dt each tick; surplus carries into the next
tick (Fiedler token-bucket).
Implementations§
Source§impl BandwidthConfig
impl BandwidthConfig
Sourcepub const DEFAULT_TARGET_BYTES_PER_SEC: u32 = 64_000
pub const DEFAULT_TARGET_BYTES_PER_SEC: u32 = 64_000
512 kbps — generous default; overridable.
Trait Implementations§
Source§impl Clone for BandwidthConfig
impl Clone for BandwidthConfig
Source§fn clone(&self) -> BandwidthConfig
fn clone(&self) -> BandwidthConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BandwidthConfig
impl Debug for BandwidthConfig
Auto Trait Implementations§
impl Freeze for BandwidthConfig
impl RefUnwindSafe for BandwidthConfig
impl Send for BandwidthConfig
impl Sync for BandwidthConfig
impl Unpin for BandwidthConfig
impl UnsafeUnpin for BandwidthConfig
impl UnwindSafe for BandwidthConfig
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