pub struct NackGeneratorBuilder { /* private fields */ }Expand description
Builder for the NackGeneratorInterceptor.
§Example
use rtc_interceptor::{Slot, Registry, NackGeneratorBuilder};
use std::time::Duration;
let chain = Registry::new()
.with(Slot::NackGenerator, NackGeneratorBuilder::new()
.with_size(512)
.with_interval(Duration::from_millis(100))
.with_skip_last_n(2)
.build())
.build();Implementations§
Source§impl NackGeneratorBuilder
impl NackGeneratorBuilder
Sourcepub fn with_size(self, size: u16) -> Self
pub fn with_size(self, size: u16) -> Self
Set the size of the receive log.
Size must be a power of 2 between 64 and 32768 (inclusive).
Sourcepub fn with_interval(self, interval: Duration) -> Self
pub fn with_interval(self, interval: Duration) -> Self
Set the interval between NACK generation cycles.
Sourcepub fn with_skip_last_n(self, skip_last_n: u16) -> Self
pub fn with_skip_last_n(self, skip_last_n: u16) -> Self
Set the number of most recent packets to skip when generating NACKs.
This helps avoid generating NACKs for packets that are simply delayed and haven’t arrived yet.
Sourcepub fn with_max_nacks_per_packet(self, max: u16) -> Self
pub fn with_max_nacks_per_packet(self, max: u16) -> Self
Set the maximum number of NACKs to send per missing packet.
Set to 0 (default) for unlimited NACKs.
Sourcepub fn build(self) -> NackGeneratorInterceptor
pub fn build(self) -> NackGeneratorInterceptor
Build the interceptor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NackGeneratorBuilder
impl RefUnwindSafe for NackGeneratorBuilder
impl Send for NackGeneratorBuilder
impl Sync for NackGeneratorBuilder
impl Unpin for NackGeneratorBuilder
impl UnsafeUnpin for NackGeneratorBuilder
impl UnwindSafe for NackGeneratorBuilder
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