Struct kitsune_p2p::gossip::sharded_gossip::BandwidthThrottle [−][src]
pub struct BandwidthThrottle { /* fields omitted */ }
Expand description
Manages incoming and outgoing bandwidth by providing methods which asynchronously wait for enough bandwidth to become available before processing a chunk of bytes
Implementations
Set the inbound and outbound bandwidth limits in megabits per second.
Wait until there’s enough bandwidth to send this many bytes.
Wait until there’s enough bandwidth to receive this many bytes.
Auto Trait Implementations
impl RefUnwindSafe for BandwidthThrottle
impl Send for BandwidthThrottle
impl Sync for BandwidthThrottle
impl Unpin for BandwidthThrottle
impl UnwindSafe for BandwidthThrottle
Blanket Implementations
Mutably borrows from an owned value. Read more
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more