pub struct ChannelMask { /* private fields */ }Expand description
The channel mask
This field is used to communicate that the channels in the file differ from FLAC’s default channel assignment definitions.
It is generally used for multi-channel audio
and stored within the VorbisComment metadata block
as the fields::CHANNEL_MASK field.
§Example
use flac_codec::metadata::{ChannelMask, Channel};
let mask = "0x003F".parse::<ChannelMask>().unwrap();
let mut channels = mask.channels();
assert_eq!(channels.next(), Some(Channel::FrontLeft));
assert_eq!(channels.next(), Some(Channel::FrontRight));
assert_eq!(channels.next(), Some(Channel::FrontCenter));
assert_eq!(channels.next(), Some(Channel::Lfe));
assert_eq!(channels.next(), Some(Channel::BackLeft));
assert_eq!(channels.next(), Some(Channel::BackRight));
assert_eq!(channels.next(), None);Implementations§
Trait Implementations§
Source§impl Clone for ChannelMask
impl Clone for ChannelMask
Source§fn clone(&self) -> ChannelMask
fn clone(&self) -> ChannelMask
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChannelMask
impl Debug for ChannelMask
Source§impl Default for ChannelMask
impl Default for ChannelMask
Source§fn default() -> ChannelMask
fn default() -> ChannelMask
Returns the “default value” for a type. Read more
Source§impl Display for ChannelMask
impl Display for ChannelMask
Source§impl From<ChannelMask> for u32
impl From<ChannelMask> for u32
Source§fn from(mask: ChannelMask) -> u32
fn from(mask: ChannelMask) -> u32
Converts to this type from the input type.
Source§impl From<u32> for ChannelMask
impl From<u32> for ChannelMask
Source§fn from(mask: u32) -> ChannelMask
fn from(mask: u32) -> ChannelMask
Converts to this type from the input type.
Source§impl FromStr for ChannelMask
impl FromStr for ChannelMask
impl Copy for ChannelMask
Auto Trait Implementations§
impl Freeze for ChannelMask
impl RefUnwindSafe for ChannelMask
impl Send for ChannelMask
impl Sync for ChannelMask
impl Unpin for ChannelMask
impl UnwindSafe for ChannelMask
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