pub struct SenderReportBuilder { /* private fields */ }
Expand description
Sender Report Builder
Implementations§
Source§impl SenderReportBuilder
impl SenderReportBuilder
Sourcepub fn padding(self, padding: u8) -> Self
pub fn padding(self, padding: u8) -> Self
Sets the number of padding bytes to use for this Sender Report.
Sourcepub fn ntp_timestamp(self, ntp_timestamp: u64) -> Self
pub fn ntp_timestamp(self, ntp_timestamp: u64) -> Self
Sets the ntp_timestamp for this Sender Report.
Sourcepub fn rtp_timestamp(self, rtp_timestamp: u32) -> Self
pub fn rtp_timestamp(self, rtp_timestamp: u32) -> Self
Sets the ntp_timestamp for this Sender Report.
Sourcepub fn packet_count(self, packet_count: u32) -> Self
pub fn packet_count(self, packet_count: u32) -> Self
Sets the packet_count for this Sender Report.
Sourcepub fn octet_count(self, octet_count: u32) -> Self
pub fn octet_count(self, octet_count: u32) -> Self
Sets the octet_count for this Sender Report.
Sourcepub fn add_report_block(self, report_block: ReportBlockBuilder) -> Self
pub fn add_report_block(self, report_block: ReportBlockBuilder) -> Self
Adds the provided Report Block.
Trait Implementations§
Source§impl Debug for SenderReportBuilder
impl Debug for SenderReportBuilder
Source§impl<'a> From<SenderReportBuilder> for PacketBuilder<'a>
impl<'a> From<SenderReportBuilder> for PacketBuilder<'a>
Source§fn from(pb: SenderReportBuilder) -> Self
fn from(pb: SenderReportBuilder) -> Self
Converts to this type from the input type.
Source§impl RtcpPacketWriter for SenderReportBuilder
impl RtcpPacketWriter for SenderReportBuilder
Source§fn calculate_size(&self) -> Result<usize, RtcpWriteError>
fn calculate_size(&self) -> Result<usize, RtcpWriteError>
Calculates the size required to write this Sender Report packet.
Returns an error if:
- Too many Report Blocks where added.
- A Report Block is erroneous.
- The padding is not a multiple of 4.
Source§fn write_into_unchecked(&self, buf: &mut [u8]) -> usize
fn write_into_unchecked(&self, buf: &mut [u8]) -> usize
Write this Sender Report into buf
without any validity checks.
Uses the length of the buffer for the length field.
Returns the number of bytes written.
§Panic
Panics if the buf is not large enough.
Source§fn get_padding(&self) -> Option<u8>
fn get_padding(&self) -> Option<u8>
Gets the padding that was configured for this RTCP packet.
Auto Trait Implementations§
impl Freeze for SenderReportBuilder
impl RefUnwindSafe for SenderReportBuilder
impl Send for SenderReportBuilder
impl Sync for SenderReportBuilder
impl Unpin for SenderReportBuilder
impl UnwindSafe for SenderReportBuilder
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
Source§impl<T> RtcpPacketWriterExt for Twhere
T: RtcpPacketWriter,
impl<T> RtcpPacketWriterExt for Twhere
T: RtcpPacketWriter,
Source§fn write_into(&self, buf: &mut [u8]) -> Result<usize, RtcpWriteError>
fn write_into(&self, buf: &mut [u8]) -> Result<usize, RtcpWriteError>
Writes the Custom packet into
buf
. Read more