WithFrame

Struct WithFrame 

Source
pub struct WithFrame<P, F, T> { /* private fields */ }
Expand description

Packetizer with mapped media frame type.

Trait Implementations§

Source§

impl<P, F, T> Packetizer for WithFrame<P, F, T>
where P: Packetizer, F: FnMut(T) -> P::Frame,

Source§

type Frame = T

Source§

type Error = <P as Packetizer>::Error

Source§

fn push(&mut self, frame: Self::Frame) -> Result<(), Self::Error>

Process a given media frame. Read more
Source§

fn flush(&mut self) -> Result<(), Self::Error>

Flush the packetizer. Read more
Source§

fn take(&mut self) -> Result<Option<RtpPacket>, Self::Error>

Take the next available RTP packet. Read more
Source§

fn with_frame<F, T>(self, f: F) -> WithFrame<Self, F, T>
where F: FnMut(T) -> Self::Frame, Self: Sized,

Convert this packetizer into a new one accepting media frames of a given type.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where F: FnMut(Self::Error) -> E, Self: Sized,

Map the packetizer error into a different one.

Auto Trait Implementations§

§

impl<P, F, T> Freeze for WithFrame<P, F, T>
where P: Freeze, F: Freeze,

§

impl<P, F, T> RefUnwindSafe for WithFrame<P, F, T>

§

impl<P, F, T> Send for WithFrame<P, F, T>
where P: Send, F: Send, T: Send,

§

impl<P, F, T> Sync for WithFrame<P, F, T>
where P: Sync, F: Sync, T: Sync,

§

impl<P, F, T> Unpin for WithFrame<P, F, T>
where P: Unpin, F: Unpin, T: Unpin,

§

impl<P, F, T> UnwindSafe for WithFrame<P, F, T>
where P: UnwindSafe, F: UnwindSafe, T: UnwindSafe,

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V