pub struct ReceiverReportBuilder { /* private fields */ }Expand description
Builder for the ReceiverReportInterceptor.
§Example
use rtc_interceptor::{Slot, Registry, ReceiverReportBuilder};
use std::time::Duration;
// With default interval (1 second)
let chain = Registry::new()
.with(Slot::ReceiverReport, ReceiverReportBuilder::new().build())
.build();
// With custom interval
let chain = Registry::new()
.with(Slot::ReceiverReport, ReceiverReportBuilder::new().with_interval(Duration::from_millis(500)).build())
.build();Implementations§
Source§impl ReceiverReportBuilder
impl ReceiverReportBuilder
Sourcepub fn with_interval(self, interval: Duration) -> Self
pub fn with_interval(self, interval: Duration) -> Self
Set a custom interval between receiver reports.
§Example
use rtc_interceptor::{ReceiverReportBuilder, Registry, Slot};
use std::time::Duration;
let registry = Registry::new().with(
Slot::ReceiverReport,
ReceiverReportBuilder::new()
.with_interval(Duration::from_millis(500))
.build(),
);Sourcepub fn build(self) -> ReceiverReportInterceptor
pub fn build(self) -> ReceiverReportInterceptor
Create a builder function for use with Registry.
This returns a closure that can be passed to Registry::with().
§Example
use rtc_interceptor::{Slot, Registry, ReceiverReportBuilder};
let registry = Registry::new()
.with(Slot::ReceiverReport, ReceiverReportBuilder::new().build());Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReceiverReportBuilder
impl RefUnwindSafe for ReceiverReportBuilder
impl Send for ReceiverReportBuilder
impl Sync for ReceiverReportBuilder
impl Unpin for ReceiverReportBuilder
impl UnsafeUnpin for ReceiverReportBuilder
impl UnwindSafe for ReceiverReportBuilder
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