pub struct ChannelMap { /* private fields */ }
Expand description
An ordered sequence of channels.
Implementations§
Source§impl ChannelMap
impl ChannelMap
Sourcepub fn add_channel(&mut self, ch: ChannelType)
pub fn add_channel(&mut self, ch: ChannelType)
Adds a single channel to the map.
Sourcepub fn add_channels(&mut self, chs: &[ChannelType])
pub fn add_channels(&mut self, chs: &[ChannelType])
Adds several channels to the map in order of occurrence.
Sourcepub fn get_channel(&self, idx: usize) -> ChannelType
pub fn get_channel(&self, idx: usize) -> ChannelType
Gets the channel type for a requested index.
Sourcepub fn find_channel_id(&self, t: ChannelType) -> Option<u8>
pub fn find_channel_id(&self, t: ChannelType) -> Option<u8>
Tries to find the position of a determined type of channel in the map.
Sourcepub fn default_map(count: usize) -> Self
pub fn default_map(count: usize) -> Self
Creates a default channel map.
Depending on the count
value, the channel map is defined differently.
When count
is 1 –> the channel map is composed by a single centered
channel.
When count
is 2 –> the channel map is composed by a right and a left
channel respectively.
For other count
values, no other implementations are given for now.
Trait Implementations§
Source§impl Clone for ChannelMap
impl Clone for ChannelMap
Source§fn clone(&self) -> ChannelMap
fn clone(&self) -> ChannelMap
Returns a copy 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 ChannelMap
impl Debug for ChannelMap
Source§impl Default for ChannelMap
impl Default for ChannelMap
Source§fn default() -> ChannelMap
fn default() -> ChannelMap
Returns the “default value” for a type. Read more
Source§impl PartialEq for ChannelMap
impl PartialEq for ChannelMap
impl Eq for ChannelMap
impl StructuralPartialEq for ChannelMap
Auto Trait Implementations§
impl Freeze for ChannelMap
impl RefUnwindSafe for ChannelMap
impl Send for ChannelMap
impl Sync for ChannelMap
impl Unpin for ChannelMap
impl UnwindSafe for ChannelMap
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