pub enum Fader {
Physical1,
Physical2,
Physical3,
Physical4,
Physical5,
Physical6,
Virtual1,
Virtual2,
Virtual3,
Virtual4,
Virtual5,
}Expand description
A fader strip: a physical or virtual channel the user mixes. The strip <->
wire-index map is model-dependent, so Fader::to_index and
Fader::from_index both take a DeviceModel:
- Pro II:
Physical1..=Physical6=> 0..=5,Virtual1..=Virtual3=> 6..=8. - Duo:
Physical1..=Physical4=> 0..=3,Virtual1..=Virtual5=> 4..=8.
A variant absent on a model (e.g. Physical6 on the Duo) has no index
there; the conversions return None.
Variants§
Physical1
Physical2
Physical3
Physical4
Physical5
Physical6
Virtual1
Virtual2
Virtual3
Virtual4
Virtual5
Implementations§
Source§impl Fader
impl Fader
Sourcepub fn to_index(self, model: DeviceModel) -> Option<u8>
pub fn to_index(self, model: DeviceModel) -> Option<u8>
The wire fader/channel index for this strip on model, or None if the
strip does not exist on that model.
Sourcepub fn from_index(model: DeviceModel, idx: u8) -> Option<Self>
pub fn from_index(model: DeviceModel, idx: u8) -> Option<Self>
Inverse of Fader::to_index: the strip at wire index idx on model,
or None if no strip maps there (e.g. index 9, the master channel).
Sourcepub fn is_physical(self, model: DeviceModel) -> bool
pub fn is_physical(self, model: DeviceModel) -> bool
true if this strip corresponds to a physical analog slide potentiometer
on model, as opposed to a virtual fader strip adjusted in software.
Trait Implementations§
impl Copy for Fader
impl Eq for Fader
impl StructuralPartialEq for Fader
Auto Trait Implementations§
impl Freeze for Fader
impl RefUnwindSafe for Fader
impl Send for Fader
impl Sync for Fader
impl Unpin for Fader
impl UnsafeUnpin for Fader
impl UnwindSafe for Fader
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