pub struct AllocatorConfig {
pub total_capacity_bps: u64,
pub min_allocation_bps: u64,
pub max_allocation_bps: u64,
pub policy: AllocationPolicy,
pub rebalance_interval_secs: u64,
pub congestion_threshold_ppm: u32,
}Expand description
Configuration for AdaptiveBandwidthAllocator.
Fields§
§total_capacity_bps: u64Total available bandwidth in bits-per-second (hard upper bound).
min_allocation_bps: u64Minimum allocation any single peer can receive.
max_allocation_bps: u64Maximum allocation any single peer can receive.
policy: AllocationPolicyAllocation policy applied during AdaptiveBandwidthAllocator::reallocate.
rebalance_interval_secs: u64How often to suggest a rebalance cycle (advisory; not enforced internally).
congestion_threshold_ppm: u32Packet-loss threshold in parts-per-million above which congestion is flagged.
Implementations§
Source§impl AllocatorConfig
impl AllocatorConfig
Sourcepub fn validate(&self) -> Result<(), AllocatorError>
pub fn validate(&self) -> Result<(), AllocatorError>
Validate the configuration, returning an error on logical inconsistencies.
Trait Implementations§
Source§impl Clone for AllocatorConfig
impl Clone for AllocatorConfig
Source§fn clone(&self) -> AllocatorConfig
fn clone(&self) -> AllocatorConfig
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 moreAuto Trait Implementations§
impl Freeze for AllocatorConfig
impl RefUnwindSafe for AllocatorConfig
impl Send for AllocatorConfig
impl Sync for AllocatorConfig
impl Unpin for AllocatorConfig
impl UnsafeUnpin for AllocatorConfig
impl UnwindSafe for AllocatorConfig
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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