pub struct ChannelLayout {
pub order: ChannelOrder,
pub channels: NonZeroU8,
pub spec: ChannelLayoutSpec,
}Fields§
§order: ChannelOrder§channels: NonZeroU8§spec: ChannelLayoutSpecImplementations§
Source§impl ChannelLayout
impl ChannelLayout
pub const MONO: Self
pub const STEREO: Self
pub const SURROUND_2_1: Self
pub const SURROUND_3_0: Self
pub const SURROUND_3_0_BACK: Self
pub const SURROUND_4_0: Self
pub const QUAD: Self
pub const SURROUND_2_2: Self
pub const SURROUND_3_1: Self
pub const SURROUND_5_0_BACK: Self
pub const SURROUND_5_0: Self
pub const SURROUND_4_1: Self
pub const SURROUND_5_1_BACK: Self
pub const SURROUND_5_1: Self
pub const SURROUND_6_0: Self
pub const SURROUND_6_0_FRONT: Self
pub const SURROUND_3_1_2: Self
pub const HEXAGONAL: Self
pub const SURROUND_6_1: Self
pub const SURROUND_6_1_BACK: Self
pub const SURROUND_6_1_FRONT: Self
pub const SURROUND_7_0: Self
pub const SURROUND_7_0_FRONT: Self
pub const SURROUND_7_1: Self
pub const SURROUND_7_1_WIDE_BACK: Self
pub const SURROUND_7_1_WIDE: Self
pub const SURROUND_5_1_2: Self
pub const SURROUND_5_1_2_BACK: Self
pub const OCTAGONAL: Self
pub const CUBE: Self
pub const SURROUND_5_1_4_BACK: Self
pub const SURROUND_7_1_2: Self
pub const SURROUND_7_1_4_BACK: Self
pub const SURROUND_9_1_4_BACK: Self
Source§impl ChannelLayout
impl ChannelLayout
pub fn from_mask(mask: ChannelMasks) -> Result<Self>
pub fn default_from_channels(channels: u8) -> Result<Self>
pub fn get_channel_from_index(&self, index: usize) -> Option<Channel>
pub fn get_index_from_channel(&self, channel: Channel) -> Option<usize>
pub fn is_valid(&self) -> bool
pub fn subset(&self, mask: ChannelMasks) -> ChannelMasks
Trait Implementations§
Source§impl Clone for ChannelLayout
impl Clone for ChannelLayout
Source§fn clone(&self) -> ChannelLayout
fn clone(&self) -> ChannelLayout
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChannelLayout
impl Debug for ChannelLayout
Source§impl Default for ChannelLayout
impl Default for ChannelLayout
Source§impl PartialEq for ChannelLayout
impl PartialEq for ChannelLayout
Source§impl TryFrom<ChannelMasks> for ChannelLayout
impl TryFrom<ChannelMasks> for ChannelLayout
Source§impl TryFrom<u8> for ChannelLayout
impl TryFrom<u8> for ChannelLayout
impl Eq for ChannelLayout
impl StructuralPartialEq for ChannelLayout
Auto Trait Implementations§
impl Freeze for ChannelLayout
impl RefUnwindSafe for ChannelLayout
impl Send for ChannelLayout
impl Sync for ChannelLayout
impl Unpin for ChannelLayout
impl UnwindSafe for ChannelLayout
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more