pub struct PacerBuilder { /* private fields */ }Expand description
Builder for PacerInterceptor.
§Example
use rtc_interceptor::{Slot, PacerBuilder, Registry};
let chain = Registry::new()
.with(Slot::Pacer, PacerBuilder::new().with_target_bitrate(2_000_000.0).build())
.build();Implementations§
Source§impl PacerBuilder
impl PacerBuilder
Sourcepub fn with_target_bitrate(self, bits_per_second: f64) -> Self
pub fn with_target_bitrate(self, bits_per_second: f64) -> Self
The rate to pace at, in bits per second.
Sourcepub fn with_burst_bits(self, burst_bits: f64) -> Self
pub fn with_burst_bits(self, burst_bits: f64) -> Self
How much may be released at once, in bits.
Larger bursts smooth less but cost fewer wake-ups.
Sourcepub fn with_queue_limit(self, queue_limit: usize) -> Self
pub fn with_queue_limit(self, queue_limit: usize) -> Self
How many packets may be queued before new ones are refused.
Sourcepub fn build(self) -> PacerInterceptor
pub fn build(self) -> PacerInterceptor
Build the interceptor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PacerBuilder
impl RefUnwindSafe for PacerBuilder
impl Send for PacerBuilder
impl Sync for PacerBuilder
impl Unpin for PacerBuilder
impl UnsafeUnpin for PacerBuilder
impl UnwindSafe for PacerBuilder
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