pub struct MediaSubtype(pub spa_media_subtype);
Expand description

Different media sub-types

Tuple Fields§

§0: spa_media_subtype

Implementations§

source§

impl MediaSubtype

source

pub const Unknown: Self = _

source

pub const Raw: Self = _

source

pub const Dsp: Self = _

source

pub const Iec958: Self = _

S/PDIF

source

pub const Dsd: Self = _

source

pub const Mp3: Self = _

source

pub const Aac: Self = _

source

pub const Vorbis: Self = _

source

pub const Wma: Self = _

source

pub const Ra: Self = _

source

pub const Sbc: Self = _

source

pub const Adpcm: Self = _

source

pub const G723: Self = _

source

pub const G726: Self = _

source

pub const G729: Self = _

source

pub const Amr: Self = _

source

pub const Gsm: Self = _

source

pub const H264: Self = _

source

pub const Mjpg: Self = _

source

pub const Dv: Self = _

source

pub const Mpegts: Self = _

source

pub const H263: Self = _

source

pub const Mpeg1: Self = _

source

pub const Mpeg2: Self = _

source

pub const Mpeg4: Self = _

source

pub const Xvid: Self = _

source

pub const Vc1: Self = _

source

pub const Vp8: Self = _

source

pub const Vp9: Self = _

source

pub const Bayer: Self = _

source

pub const Jpeg: Self = _

source

pub const Midi: Self = _

source

pub const Control: Self = _

control stream, data contains spa_pod_sequence with control info.

source

pub fn is_audio(&self) -> bool

source

pub fn is_video(&self) -> bool

source

pub fn is_image(&self) -> bool

source

pub fn is_binary(&self) -> bool

source

pub fn is_stream(&self) -> bool

source

pub fn is_application(&self) -> bool

source

pub fn from_raw(raw: spa_media_subtype) -> Self

Obtain a MediaSubtype from a raw spa_media_subtype variant.

source

pub fn as_raw(&self) -> spa_media_subtype

Get the raw spa_sys::spa_media_subtype representing this MediaSubtype.

Trait Implementations§

source§

impl Clone for MediaSubtype

source§

fn clone(&self) -> MediaSubtype

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MediaSubtype

source§

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

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

impl PartialEq for MediaSubtype

source§

fn eq(&self, other: &MediaSubtype) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for MediaSubtype

source§

fn partial_cmp(&self, other: &MediaSubtype) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for MediaSubtype

source§

impl Eq for MediaSubtype

source§

impl StructuralPartialEq for MediaSubtype

Auto Trait Implementations§

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.