MapErr

Struct MapErr 

Source
pub struct MapErr<D, F> { /* private fields */ }
Expand description

Depacketizer with mapped error type.

Trait Implementations§

Source§

impl<D, F, E> Depacketizer for MapErr<D, F>
where D: Depacketizer, F: FnMut(D::Error) -> E,

Source§

type Frame = <D as Depacketizer>::Frame

Source§

type Error = E

Source§

fn push(&mut self, packet: RtpPacket) -> Result<(), Self::Error>

Process a given RTP packet. Read more
Source§

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

Flush the depacketizer. Read more
Source§

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

Take the next available media frame. Read more
Source§

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

Map the media frame into a different type.
Source§

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

Map the depacketizer error into a different one.

Auto Trait Implementations§

§

impl<D, F> Freeze for MapErr<D, F>
where D: Freeze, F: Freeze,

§

impl<D, F> RefUnwindSafe for MapErr<D, F>

§

impl<D, F> Send for MapErr<D, F>
where D: Send, F: Send,

§

impl<D, F> Sync for MapErr<D, F>
where D: Sync, F: Sync,

§

impl<D, F> Unpin for MapErr<D, F>
where D: Unpin, F: Unpin,

§

impl<D, F> UnwindSafe for MapErr<D, F>
where D: UnwindSafe, F: 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