[−][src]Enum libpulse_binding::sample::Format
Sample format
Variants
Unsigned 8 Bit PCM.
8 Bit a-Law.
8 Bit mu-Law.
Signed 16 Bit PCM, little endian (PC).
Signed 16 Bit PCM, big endian.
32 Bit IEEE floating point, little endian (PC), range -1.0 to 1.0.
32 Bit IEEE floating point, big endian, range -1.0 to 1.0.
Signed 32 Bit PCM, little endian (PC).
Signed 32 Bit PCM, big endian.
Signed 24 Bit PCM packed, little endian (PC).
Signed 24 Bit PCM packed, big endian.
Signed 24 Bit PCM in LSB of 32 Bit words, little endian (PC).
Signed 24 Bit PCM in LSB of 32 Bit words, big endian.
An invalid value.
Implementations
impl Format
[src]
pub fn size(&self) -> usize
[src]
Similar to Spec::sample_size
but take a sample
format instead of full sample spec.
pub fn to_string(&self) -> Option<Cow<'static, str>>
[src]
Gets a descriptive string for the specified sample format.
pub fn parse(format: &str) -> Self
[src]
Parses a sample format text. Inverse of to_string
.
pub fn is_le(&self) -> Option<bool>
[src]
Checks if format is little endian.
Returns true
when the specified format is little endian, false
if big endian. Returns
None
when endianness does not apply to this format, or if unknown.
pub fn is_be(&self) -> Option<bool>
[src]
Checks if format is big endian.
Returns true
when the specified format is big endian, false
if little endian. Returns
None
when endianness does not apply to this format, or if unknown.
pub fn is_ne(&self) -> Option<bool>
[src]
Checks if format is native endian.
Returns true
when the specified format is native endian, false
when not. Returns None
when endianness does not apply to the specified format, or endianness is unknown.
pub fn is_re(&self) -> Option<bool>
[src]
Checks if format is reverse of native endian.
Returns true
when the specified format is reverse endian, false
when not. Returns None
when endianness does not apply to the specified format, or endianness is unknown.
Trait Implementations
impl Clone for Format
[src]
impl Copy for Format
[src]
impl Debug for Format
[src]
impl Default for Format
[src]
impl Eq for Format
[src]
impl From<Format> for pa_sample_format_t
[src]
impl From<pa_sample_format_t> for Format
[src]
pub fn from(f: pa_sample_format_t) -> Self
[src]
impl FromPrimitive for Format
[src]
pub fn from_i64(n: i64) -> Option<Self>
[src]
pub fn from_u64(n: u64) -> Option<Self>
[src]
pub fn from_isize(n: isize) -> Option<Self>
[src]
pub fn from_i8(n: i8) -> Option<Self>
[src]
pub fn from_i16(n: i16) -> Option<Self>
[src]
pub fn from_i32(n: i32) -> Option<Self>
[src]
pub fn from_i128(n: i128) -> Option<Self>
[src]
pub fn from_usize(n: usize) -> Option<Self>
[src]
pub fn from_u8(n: u8) -> Option<Self>
[src]
pub fn from_u16(n: u16) -> Option<Self>
[src]
pub fn from_u32(n: u32) -> Option<Self>
[src]
pub fn from_u128(n: u128) -> Option<Self>
[src]
pub fn from_f32(n: f32) -> Option<Self>
[src]
pub fn from_f64(n: f64) -> Option<Self>
[src]
impl PartialEq<Format> for Format
[src]
pub fn eq(&self, other: &Format) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Format
[src]
impl StructuralPartialEq for Format
[src]
impl ToPrimitive for Format
[src]
pub fn to_i64(&self) -> Option<i64>
[src]
pub fn to_u64(&self) -> Option<u64>
[src]
pub fn to_isize(&self) -> Option<isize>
[src]
pub fn to_i8(&self) -> Option<i8>
[src]
pub fn to_i16(&self) -> Option<i16>
[src]
pub fn to_i32(&self) -> Option<i32>
[src]
pub fn to_i128(&self) -> Option<i128>
[src]
pub fn to_usize(&self) -> Option<usize>
[src]
pub fn to_u8(&self) -> Option<u8>
[src]
pub fn to_u16(&self) -> Option<u16>
[src]
pub fn to_u32(&self) -> Option<u32>
[src]
pub fn to_u128(&self) -> Option<u128>
[src]
pub fn to_f32(&self) -> Option<f32>
[src]
pub fn to_f64(&self) -> Option<f64>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnwindSafe for Format
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,