Struct cubeb::ChannelLayout
[−]
pub struct ChannelLayout { /* fields omitted */ }
Some common layout definitions
Methods
impl ChannelLayout
[src]
pub const UNDEFINED: ChannelLayout
UNDEFINED: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_UNDEFINED,}
pub const MONO: ChannelLayout
MONO: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_MONO,}
pub const MONO_LFE: ChannelLayout
MONO_LFE: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_MONO_LFE,}
pub const STEREO: ChannelLayout
STEREO: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_STEREO,}
pub const STEREO_LFE: ChannelLayout
STEREO_LFE: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_STEREO_LFE,}
pub const _3F: ChannelLayout
_3F: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_3F,}
pub const _3F_LFE: ChannelLayout
_3F_LFE: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_3F_LFE,}
pub const _2F1: ChannelLayout
_2F1: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_2F1,}
pub const _2F1_LFE: ChannelLayout
_2F1_LFE: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_2F1_LFE,}
pub const _3F1: ChannelLayout
_3F1: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_3F1,}
pub const _3F1_LFE: ChannelLayout
_3F1_LFE: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_3F1_LFE,}
pub const _2F2: ChannelLayout
_2F2: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_2F2,}
pub const _2F2_LFE: ChannelLayout
_2F2_LFE: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_2F2_LFE,}
pub const QUAD: ChannelLayout
QUAD: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_QUAD,}
pub const QUAD_LFE: ChannelLayout
QUAD_LFE: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_QUAD_LFE,}
pub const _3F2: ChannelLayout
_3F2: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_3F2,}
pub const _3F2_LFE: ChannelLayout
_3F2_LFE: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_3F2_LFE,}
pub const _3F2_BACK: ChannelLayout
_3F2_BACK: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_3F2_BACK,}
pub const _3F2_LFE_BACK: ChannelLayout
_3F2_LFE_BACK: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_3F2_LFE_BACK,}
pub const _3F3R_LFE: ChannelLayout
_3F3R_LFE: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_3F3R_LFE,}
pub const _3F4_LFE: ChannelLayout
_3F4_LFE: ChannelLayout = ChannelLayout{bits: ffi::CUBEB_LAYOUT_3F4_LFE,}
impl ChannelLayout
[src]
pub fn num_channels(&self) -> u32
[src]
impl ChannelLayout
pub const FRONT_LEFT: ChannelLayout
FRONT_LEFT: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_FRONT_LEFT,}
pub const FRONT_RIGHT: ChannelLayout
FRONT_RIGHT: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_FRONT_RIGHT,}
pub const FRONT_CENTER: ChannelLayout
FRONT_CENTER: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_FRONT_CENTER,}
pub const LOW_FREQUENCY: ChannelLayout
LOW_FREQUENCY: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_LOW_FREQUENCY,}
pub const BACK_LEFT: ChannelLayout
BACK_LEFT: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_BACK_LEFT,}
pub const BACK_RIGHT: ChannelLayout
BACK_RIGHT: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_BACK_RIGHT,}
pub const FRONT_LEFT_OF_CENTER: ChannelLayout
FRONT_LEFT_OF_CENTER: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_FRONT_LEFT_OF_CENTER,}
pub const FRONT_RIGHT_OF_CENTER: ChannelLayout
FRONT_RIGHT_OF_CENTER: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_FRONT_RIGHT_OF_CENTER,}
pub const BACK_CENTER: ChannelLayout
BACK_CENTER: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_BACK_CENTER,}
pub const SIDE_LEFT: ChannelLayout
SIDE_LEFT: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_SIDE_LEFT,}
pub const SIDE_RIGHT: ChannelLayout
SIDE_RIGHT: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_SIDE_RIGHT,}
pub const TOP_CENTER: ChannelLayout
TOP_CENTER: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_TOP_CENTER,}
pub const TOP_FRONT_LEFT: ChannelLayout
TOP_FRONT_LEFT: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_TOP_FRONT_LEFT,}
pub const TOP_FRONT_CENTER: ChannelLayout
TOP_FRONT_CENTER: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_TOP_FRONT_CENTER,}
pub const TOP_FRONT_RIGHT: ChannelLayout
TOP_FRONT_RIGHT: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_TOP_FRONT_RIGHT,}
pub const TOP_BACK_LEFT: ChannelLayout
TOP_BACK_LEFT: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_TOP_BACK_LEFT,}
pub const TOP_BACK_CENTER: ChannelLayout
TOP_BACK_CENTER: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_TOP_BACK_CENTER,}
pub const TOP_BACK_RIGHT: ChannelLayout
TOP_BACK_RIGHT: ChannelLayout = ChannelLayout{bits: ffi::CHANNEL_TOP_BACK_RIGHT,}
pub fn empty() -> ChannelLayout
Returns an empty set of flags.
pub fn all() -> ChannelLayout
Returns the set containing all flags.
pub fn bits(&self) -> u32
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u32) -> Option<ChannelLayout>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u32) -> ChannelLayout
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: ChannelLayout) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: ChannelLayout) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: ChannelLayout)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: ChannelLayout)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: ChannelLayout)
Toggles the specified flags in-place.
pub fn set(&mut self, other: ChannelLayout, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Sub<ChannelLayout> for ChannelLayout
type Output = ChannelLayout
The resulting type after applying the -
operator.
fn sub(self, other: ChannelLayout) -> ChannelLayout
Returns the set difference of the two sets of flags.
impl Octal for ChannelLayout
impl PartialOrd<ChannelLayout> for ChannelLayout
fn partial_cmp(&self, __arg_0: &ChannelLayout) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &ChannelLayout) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &ChannelLayout) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &ChannelLayout) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &ChannelLayout) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Into<u32> for ChannelLayout
[src]
impl Copy for ChannelLayout
impl Extend<ChannelLayout> for ChannelLayout
fn extend<T>(&mut self, iterator: T) where
T: IntoIterator<Item = ChannelLayout>,
T: IntoIterator<Item = ChannelLayout>,
Extends a collection with the contents of an iterator. Read more
impl PartialEq<ChannelLayout> for ChannelLayout
fn eq(&self, __arg_0: &ChannelLayout) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ChannelLayout) -> bool
This method tests for !=
.
impl UpperHex for ChannelLayout
impl Clone for ChannelLayout
fn clone(&self) -> ChannelLayout
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl BitOrAssign<ChannelLayout> for ChannelLayout
fn bitor_assign(&mut self, other: ChannelLayout)
Adds the set of flags.
impl BitAndAssign<ChannelLayout> for ChannelLayout
fn bitand_assign(&mut self, other: ChannelLayout)
Disables all flags disabled in the set.
impl Ord for ChannelLayout
fn cmp(&self, __arg_0: &ChannelLayout) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl BitOr<ChannelLayout> for ChannelLayout
type Output = ChannelLayout
The resulting type after applying the |
operator.
fn bitor(self, other: ChannelLayout) -> ChannelLayout
Returns the union of the two sets of flags.
impl BitXor<ChannelLayout> for ChannelLayout
type Output = ChannelLayout
The resulting type after applying the ^
operator.
fn bitxor(self, other: ChannelLayout) -> ChannelLayout
Returns the left flags, but with all the right flags toggled.
impl LowerHex for ChannelLayout
impl SubAssign<ChannelLayout> for ChannelLayout
fn sub_assign(&mut self, other: ChannelLayout)
Disables all flags enabled in the set.
impl Binary for ChannelLayout
impl Not for ChannelLayout
type Output = ChannelLayout
The resulting type after applying the !
operator.
fn not(self) -> ChannelLayout
Returns the complement of this set of flags.
impl BitXorAssign<ChannelLayout> for ChannelLayout
fn bitxor_assign(&mut self, other: ChannelLayout)
Toggles the set of flags.
impl Hash for ChannelLayout
fn hash<__H>(&self, __arg_0: &mut __H) where
__H: Hasher,
__H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl FromIterator<ChannelLayout> for ChannelLayout
fn from_iter<T>(iterator: T) -> ChannelLayout where
T: IntoIterator<Item = ChannelLayout>,
T: IntoIterator<Item = ChannelLayout>,
Creates a value from an iterator. Read more
impl Eq for ChannelLayout
impl From<u32> for ChannelLayout
[src]
fn from(x: u32) -> ChannelLayout
[src]
Performs the conversion.
impl BitAnd<ChannelLayout> for ChannelLayout
type Output = ChannelLayout
The resulting type after applying the &
operator.
fn bitand(self, other: ChannelLayout) -> ChannelLayout
Returns the intersection between the two sets of flags.