Struct msf_rtp::rtcp::ReportBlock
source · [−]pub struct ReportBlock { /* private fields */ }
Expand description
Sender/receiver report block.
Implementations
sourceimpl ReportBlock
impl ReportBlock
sourcepub fn decode(data: &mut Bytes) -> Result<Self, InvalidInput>
pub fn decode(data: &mut Bytes) -> Result<Self, InvalidInput>
Decode a report block from given data.
sourcepub fn fractional_loss(&self) -> u8
pub fn fractional_loss(&self) -> u8
Get fractional loss as 0.8 fixed point number.
sourcepub fn with_fractional_loss(self, loss: u8) -> Self
pub fn with_fractional_loss(self, loss: u8) -> Self
Set fractional loss as 0.8 fixed point number.
sourcepub fn cumulative_loss(&self) -> i32
pub fn cumulative_loss(&self) -> i32
Get cumulative packet loss (the precision is only up to 24 bits).
sourcepub fn with_cumulative_loss(self, loss: i32) -> Self
pub fn with_cumulative_loss(self, loss: i32) -> Self
Set cumulative packet loss (the precision is only up to 24 bits).
sourcepub fn extended_sequence_number(&self) -> u32
pub fn extended_sequence_number(&self) -> u32
Get extended highest sequence number.
sourcepub fn with_extended_sequence_number(self, n: u32) -> Self
pub fn with_extended_sequence_number(self, n: u32) -> Self
Set the extended sequence number.
sourcepub fn with_jitter(self, jitter: u32) -> Self
pub fn with_jitter(self, jitter: u32) -> Self
Set the jitter.
sourcepub fn last_sr_timestamp(&self) -> u64
pub fn last_sr_timestamp(&self) -> u64
Get NTP timestamp of the last sender report (after truncating to the middle 32 bits).
The returned timestamp is a 32.32 fixed point number.
sourcepub fn with_last_sr_timestamp(self, ts: u64) -> Self
pub fn with_last_sr_timestamp(self, ts: u64) -> Self
Set NTP timestamp of the last sender report.
The timestamp is expected to be a 32.32 fixed point number and it will be truncated to the middle 32 bits.
sourcepub fn delay_since_last_sr(&self) -> Duration
pub fn delay_since_last_sr(&self) -> Duration
Get delay since the last sender report.
sourcepub fn with_delay_since_last_sr(self, delay: Duration) -> Self
pub fn with_delay_since_last_sr(self, delay: Duration) -> Self
Set delay since the last sender report.
Trait Implementations
sourceimpl Clone for ReportBlock
impl Clone for ReportBlock
sourcefn clone(&self) -> ReportBlock
fn clone(&self) -> ReportBlock
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for ReportBlock
impl Default for ReportBlock
impl Copy for ReportBlock
Auto Trait Implementations
impl RefUnwindSafe for ReportBlock
impl Send for ReportBlock
impl Sync for ReportBlock
impl Unpin for ReportBlock
impl UnwindSafe for ReportBlock
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more