pub struct ClapParamMap { /* private fields */ }Expand description
A translation table from CLAP parameter ids to SIM parameter ids.
Unmapped CLAP ids resolve to themselves, so an empty map behaves as the identity mapping.
Implementations§
Source§impl ClapParamMap
impl ClapParamMap
Sourcepub fn identity(ids: impl IntoIterator<Item = u32>) -> Self
pub fn identity(ids: impl IntoIterator<Item = u32>) -> Self
Builds a map sending each id in ids to itself.
Sourcepub fn insert(&mut self, clap_param_id: u32, sim_param_id: u32)
pub fn insert(&mut self, clap_param_id: u32, sim_param_id: u32)
Records that clap_param_id translates to sim_param_id.
Sourcepub fn sim_param_for(&self, clap_param_id: u32) -> u32
pub fn sim_param_for(&self, clap_param_id: u32) -> u32
Resolves a CLAP parameter id to its SIM parameter id.
Returns clap_param_id unchanged when no mapping is recorded.
Trait Implementations§
Source§impl Clone for ClapParamMap
impl Clone for ClapParamMap
Source§fn clone(&self) -> ClapParamMap
fn clone(&self) -> ClapParamMap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ClapParamMap
impl Debug for ClapParamMap
Source§impl Default for ClapParamMap
impl Default for ClapParamMap
Source§fn default() -> ClapParamMap
fn default() -> ClapParamMap
Returns the “default value” for a type. Read more
impl Eq for ClapParamMap
Source§impl PartialEq for ClapParamMap
impl PartialEq for ClapParamMap
Source§fn eq(&self, other: &ClapParamMap) -> bool
fn eq(&self, other: &ClapParamMap) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClapParamMap
Auto Trait Implementations§
impl Freeze for ClapParamMap
impl RefUnwindSafe for ClapParamMap
impl Send for ClapParamMap
impl Sync for ClapParamMap
impl Unpin for ClapParamMap
impl UnsafeUnpin for ClapParamMap
impl UnwindSafe for ClapParamMap
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