#[non_exhaustive]pub enum ChannelLayout {
Mono,
Stereo,
Surround21,
Surround51,
Surround71,
Custom(u16),
}Expand description
Channel layout — speaker arrangement.
Tier: T2-P (Σ + N — variant sum of channel counts)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Mono
Single channel.
Stereo
Left + Right.
Surround21
2.1 — Left, Right, LFE.
Surround51
5.1 — FL, FR, C, LFE, SL, SR.
Surround71
7.1 — FL, FR, C, LFE, SL, SR, BL, BR.
Custom(u16)
Custom channel count.
Implementations§
Source§impl ChannelLayout
impl ChannelLayout
Sourcepub const fn from_channels(n: u16) -> Self
pub const fn from_channels(n: u16) -> Self
Create from channel count.
Sourcepub const fn is_standard(self) -> bool
pub const fn is_standard(self) -> bool
Whether this layout is standard.
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 · Source§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<'de> Deserialize<'de> for ChannelLayout
impl<'de> Deserialize<'de> for ChannelLayout
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ChannelLayout
impl Display for ChannelLayout
Source§impl Hash for ChannelLayout
impl Hash for ChannelLayout
Source§impl PartialEq for ChannelLayout
impl PartialEq for ChannelLayout
Source§impl Serialize for ChannelLayout
impl Serialize for ChannelLayout
impl Copy 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 UnsafeUnpin for ChannelLayout
impl UnwindSafe for ChannelLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more