pub struct CompoundBuilder<'a> { /* private fields */ }
Expand description
A builder for a Compound
RTCP packet
Implementations§
Source§impl<'a> CompoundBuilder<'a>
impl<'a> CompoundBuilder<'a>
Sourcepub fn add_packet(self, packet: impl RtcpPacketWriter + 'a) -> Self
pub fn add_packet(self, packet: impl RtcpPacketWriter + 'a) -> Self
Add a packet to the compound rtcp packet
Trait Implementations§
Source§impl<'a> Debug for CompoundBuilder<'a>
impl<'a> Debug for CompoundBuilder<'a>
Source§impl<'a> Default for CompoundBuilder<'a>
impl<'a> Default for CompoundBuilder<'a>
Source§fn default() -> CompoundBuilder<'a>
fn default() -> CompoundBuilder<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> RtcpPacketWriter for CompoundBuilder<'a>
impl<'a> RtcpPacketWriter for CompoundBuilder<'a>
Source§fn calculate_size(&self) -> Result<usize, RtcpWriteError>
fn calculate_size(&self) -> Result<usize, RtcpWriteError>
Calculates the size required to write this Receiver Report packet.
Returns an error if:
- A Packet is erroneous.
- A Packet defined a padding while it’s not the last packet in the Compound.
Source§fn write_into_unchecked(&self, buf: &mut [u8]) -> usize
fn write_into_unchecked(&self, buf: &mut [u8]) -> usize
Writes this Compound packet into buf
without prior length 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 or if a packet is invalid.
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<'a> Freeze for CompoundBuilder<'a>
impl<'a> !RefUnwindSafe for CompoundBuilder<'a>
impl<'a> !Send for CompoundBuilder<'a>
impl<'a> !Sync for CompoundBuilder<'a>
impl<'a> Unpin for CompoundBuilder<'a>
impl<'a> !UnwindSafe for CompoundBuilder<'a>
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