Struct AudioFormat

Source
#[repr(transparent)]
pub struct AudioFormat(pub spa_audio_format);

Tuple Fields§

§0: spa_audio_format

Implementations§

Source§

impl AudioFormat

Source

pub const Unknown: Self

Source

pub const Encoded: Self

Source

pub const S8: Self

Source

pub const U8: Self

Source

pub const S16LE: Self

Source

pub const S16BE: Self

Source

pub const U16LE: Self

Source

pub const U16BE: Self

Source

pub const S24_32LE: Self

Source

pub const S24_32BE: Self

Source

pub const U24_32LE: Self

Source

pub const U24_32BE: Self

Source

pub const S32LE: Self

Source

pub const S32BE: Self

Source

pub const U32LE: Self

Source

pub const U32BE: Self

Source

pub const S24LE: Self

Source

pub const S24BE: Self

Source

pub const U24LE: Self

Source

pub const U24BE: Self

Source

pub const S20LE: Self

Source

pub const S20BE: Self

Source

pub const U20LE: Self

Source

pub const U20BE: Self

Source

pub const S18LE: Self

Source

pub const S18BE: Self

Source

pub const U18LE: Self

Source

pub const U18BE: Self

Source

pub const F32LE: Self

Source

pub const F32BE: Self

Source

pub const F64LE: Self

Source

pub const F64BE: Self

Source

pub const ULAW: Self

Source

pub const ALAW: Self

Source

pub const S16: Self

Source

pub const U16: Self

Source

pub const S18: Self

Source

pub const U18: Self

Source

pub const S20: Self

Source

pub const U20: Self

Source

pub const S24: Self

Source

pub const U24: Self

Source

pub const S32: Self

Source

pub const U32: Self

Source

pub const U8P: Self

Source

pub const S16P: Self

Source

pub const S24_32P: Self

Source

pub const S32P: Self

Source

pub const S24P: Self

Source

pub const F32P: Self

Source

pub const F64P: Self

Source

pub const S8P: Self

Source

pub fn is_interleaved(&self) -> bool

Source

pub fn is_planar(&self) -> bool

Source

pub fn from_raw(raw: spa_audio_format) -> Self

Obtain an AudioFormat from a raw spa_audio_format variant.

Source

pub fn as_raw(&self) -> spa_audio_format

Get the raw spa_sys::spa_audio_format representing this AudioFormat.

Trait Implementations§

Source§

impl Clone for AudioFormat

Source§

fn clone(&self) -> AudioFormat

Returns a duplicate 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 AudioFormat

Source§

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

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

impl PartialEq for AudioFormat

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for AudioFormat

Source§

fn partial_cmp(&self, other: &AudioFormat) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for AudioFormat

Source§

impl Eq for AudioFormat

Source§

impl StructuralPartialEq for AudioFormat

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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

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.