pub trait RtcpPacketWriterExt: RtcpPacketWriter {
// Provided method
fn write_into(&self, buf: &mut [u8]) -> Result<usize, RtcpWriteError> { ... }
}
Expand description
Extension providing helpders for writing a RtcpPacket
.
Provided Methods§
Sourcefn 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
.
The default implementation:
- Calls
RtcpPacketWriter::calculate_size
for validity checks and size calculation. - Checks that the provided buffer is large enough to store this RTCP packet.
- Writes to the provided buffer using
RtcpPacketWriter::write_into_unchecked
.