Skip to main content

ReceiverItemRef

Enum ReceiverItemRef 

Source
#[non_exhaustive]
pub enum ReceiverItemRef<'rx> { Video(VideoFrameRef<'rx>), Audio(AudioFrameRef<'rx>), Metadata(MetadataFrameRef<'rx>), Event(ReceiverEvent), }
Expand description

An item delivered by Receiver::capture_any_ref. Media borrows native storage and keeps the receiver borrowed until its matching guard is dropped. Borrowed capture allocates and copies no payload; video row and audio channel padding are never exposed as initialized slices.

These items implement Send + Sync under the same SDK contract as the typed receiver references. They may move to scoped worker threads while retaining their receiver borrow. Use Self::to_owned to keep an item after releasing the receiver.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Video(VideoFrameRef<'rx>)

Validated uncompressed video, possibly with padded rows or planes.

§

Audio(AudioFrameRef<'rx>)

Validated planar audio, possibly with padded channels.

§

Metadata(MetadataFrameRef<'rx>)

Standalone frame metadata.

§

Event(ReceiverEvent)

A consumed, coalesced receiver invalidation; no native buffer.

Implementations§

Source§

impl ReceiverItemRef<'_>

Source

pub fn to_owned(&self) -> ReceiverItem

Copy media into an owned item using the typed capture copy paths. Video rows and audio channels become packed; timing and metadata are preserved. Video/audio allocate one payload buffer and metadata when present; metadata allocates its text; events simply copy their value. This makes no SDK call and retains no native frame or receiver borrow.

Trait Implementations§

Source§

impl<'rx> Debug for ReceiverItemRef<'rx>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'rx> Freeze for ReceiverItemRef<'rx>

§

impl<'rx> RefUnwindSafe for ReceiverItemRef<'rx>

§

impl<'rx> Send for ReceiverItemRef<'rx>

§

impl<'rx> Sync for ReceiverItemRef<'rx>

§

impl<'rx> Unpin for ReceiverItemRef<'rx>

§

impl<'rx> UnsafeUnpin for ReceiverItemRef<'rx>

§

impl<'rx> UnwindSafe for ReceiverItemRef<'rx>

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.