pub struct ReceiverReportBuilder<P> { /* private fields */ }Expand description
Builder for the ReceiverReportInterceptor.
§Example
use rtc_interceptor::{Registry, ReceiverReportBuilder};
use std::time::Duration;
// With default interval (1 second)
let chain = Registry::new()
.with(ReceiverReportBuilder::new().build())
.build();
// With custom interval
let chain = Registry::new()
.with(ReceiverReportBuilder::new().with_interval(Duration::from_millis(500)).build())
.build();Implementations§
Source§impl<P> ReceiverReportBuilder<P>
impl<P> ReceiverReportBuilder<P>
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};
use std::time::Duration;
// The builder is generic over the next layer, so its type is pinned by `with`.
let registry = Registry::new().with(
ReceiverReportBuilder::new()
.with_interval(Duration::from_millis(500))
.build(),
);Sourcepub fn build(self) -> impl FnOnce(P) -> ReceiverReportInterceptor<P>
pub fn build(self) -> impl FnOnce(P) -> ReceiverReportInterceptor<P>
Create a builder function for use with Registry.
This returns a closure that can be passed to Registry::with().
§Example
use rtc_interceptor::{Registry, ReceiverReportBuilder};
let registry = Registry::new()
.with(ReceiverReportBuilder::new().build());Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for ReceiverReportBuilder<P>
impl<P> RefUnwindSafe for ReceiverReportBuilder<P>where
P: RefUnwindSafe,
impl<P> Send for ReceiverReportBuilder<P>where
P: Send,
impl<P> Sync for ReceiverReportBuilder<P>where
P: Sync,
impl<P> Unpin for ReceiverReportBuilder<P>where
P: Unpin,
impl<P> UnsafeUnpin for ReceiverReportBuilder<P>
impl<P> UnwindSafe for ReceiverReportBuilder<P>where
P: UnwindSafe,
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