RtpPacketWriterVec

Struct RtpPacketWriterVec 

Source
pub struct RtpPacketWriterVec<'a, 'b> { /* private fields */ }
Expand description

An implementation of a RtpPacketWriter that appends to a Vec<u8>.

Trait Implementations§

Source§

impl<'a, 'b> Debug for RtpPacketWriterVec<'a, 'b>

Source§

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

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

impl<'a, 'b> Default for RtpPacketWriterVec<'a, 'b>

Source§

fn default() -> RtpPacketWriterVec<'a, 'b>

Returns the “default value” for a type. Read more
Source§

impl<'a, 'b> RtpPacketWriter for RtpPacketWriterVec<'a, 'b>

Source§

type Output = Vec<u8>

The type of the output.
Source§

type Payload = &'a [u8]

The type of the RTP payload to be stored in the output packet.
Source§

type Extension = &'b [u8]

The type of the RTP extension data to be stored in the output packet:was.
Source§

fn reserve(&mut self, size: usize)

Reserve a number of bytes in the output. Multiple calls are possible and provide the entire size to reserve.
Source§

fn push(&mut self, data: &[u8])

Provides data to append to the output. May be called multiple times per packet.
Source§

fn push_extension(&mut self, extension_data: &Self::Extension)

Provides the extension data to add to the output. The extension should be written as-is without any transformations.
Source§

fn push_payload(&mut self, data: &Self::Payload)

Provides the payload data to add to the output. The payload should be written as-is without any transformations.
Source§

fn padding(&mut self, size: u8)

Provides any padding value the builder was constructed with. The padding value specifies the number of bytes of zeroes of padding at the end to write. The last byte of padding must be set to the padding count. e.g. Read more
Source§

fn finish(&mut self) -> Self::Output

Finishes and returns the built RTP packet. The implementation should reset internal state so that a new packet can be created after finish is called.
Source§

fn max_size(&self) -> Option<usize>

Return the maximum size of the output. If the output data is not bound to a fixed size, None should be returned.

Auto Trait Implementations§

§

impl<'a, 'b> Freeze for RtpPacketWriterVec<'a, 'b>

§

impl<'a, 'b> RefUnwindSafe for RtpPacketWriterVec<'a, 'b>

§

impl<'a, 'b> Send for RtpPacketWriterVec<'a, 'b>

§

impl<'a, 'b> Sync for RtpPacketWriterVec<'a, 'b>

§

impl<'a, 'b> Unpin for RtpPacketWriterVec<'a, 'b>

§

impl<'a, 'b> UnwindSafe for RtpPacketWriterVec<'a, 'b>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.