pub struct ReceiverReportBuilder { /* private fields */ }Expand description
Builder for the ReceiverReportInterceptor.
§Example
use rtci_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 rtci_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 with_wall_clock(self, anchor: SystemInstant) -> Self
pub fn with_wall_clock(self, anchor: SystemInstant) -> Self
The wall-clock anchor the receiver reference times’ NTP timestamps (RFC 3611 section
4.4) derive from. Default: the process-wide SystemInstant::shared. Give one per
peer connection for reproducible virtual-time runs: two runs in one process otherwise
map the same instants to NTP times as far apart as the real time between them.
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 rtci_interceptor::{Slot, Registry, ReceiverReportBuilder};
let registry = Registry::new()
.with(Slot::ReceiverReport, ReceiverReportBuilder::new().build());Trait Implementations§
Auto Trait Implementations§
impl Forget for ReceiverReportBuilder
impl Freeze for ReceiverReportBuilder
impl Move 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