Skip to main content

RtcpRandom

Trait RtcpRandom 

Source
pub trait RtcpRandom: Send + Sync {
    // Required method
    fn next_u32(&mut self) -> u32;

    // Provided method
    fn unit(&mut self) -> f64 { ... }
}
Expand description

The source of the random numbers the RTCP session uses: the variation of the report interval (RFC 3550 6.3.1), the dither of early feedback (RFC 4585 3.5.2), a reporting SSRC (RFC 3550 8.1) and the CNAME (RFC 7022 section 5).

The default draws from the operating system’s CSPRNG through rand. A test supplies its own for a run that repeats exactly.

Required Methods§

Source

fn next_u32(&mut self) -> u32

32 random bits.

Provided Methods§

Source

fn unit(&mut self) -> f64

A number uniformly distributed in [0, 1).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§