TwccBuilder

Struct TwccBuilder 

Source
pub struct TwccBuilder { /* private fields */ }
Expand description

Builder for a TWCC (Transport-Wide Congestion Control) FCI packet

Implementations§

Source§

impl TwccBuilder

Source

pub fn new( base_seq: u16, reference_time: u32, feedback_packet_count: u8, status_list: &[TwccPacketStatus], max_size: Option<usize>, ) -> TwccBuilder

Create a new TwccBuilder with the given packet status list.

max_size limits the number of bytes the FCI portion of the RTCP packet can use. If set, TwccBuilder::packet_status_count must be used to check how many status entries have been consumed. Any remaining status entries must be encoded in a separate feedback packet.

Source

pub fn packet_status_count(&self) -> usize

Number of packet status entries contained in this builder.

Trait Implementations§

Source§

impl Debug for TwccBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FciBuilder<'_> for TwccBuilder

Source§

fn format(&self) -> u8

The format field value to place in the RTCP header
Source§

fn supports_feedback_type(&self) -> FciFeedbackPacketType

The type of feedback packet this FCI data supports being placed in
Source§

impl RtcpPacketWriter for TwccBuilder

Source§

fn calculate_size(&self) -> Result<usize, RtcpWriteError>

Calculates the size required to write this RTCP packet. Read more
Source§

fn write_into_unchecked(&self, buf: &mut [u8]) -> usize

Writes this RTCP packet into buf without any validity checks. Read more
Source§

fn get_padding(&self) -> Option<u8>

Gets the padding that was configured for this RTCP packet.

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> RtcpPacketWriterExt for T

Source§

fn write_into(&self, buf: &mut [u8]) -> Result<usize, RtcpWriteError>

Writes the Custom packet into buf. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.