pub struct Preset<const B: usize = MAX_BUTTONS, const E: usize = MAX_ENCODERS, const A: usize = MAX_ANALOG> {
pub name: Label,
pub buttons: Vec<ButtonConfig, B>,
pub encoders: Vec<EncoderConfig, E>,
pub analog: Vec<AnalogConfig, A>,
pub defaults: InitialState<B, E>,
pub on_enter: Vec<Action, MAX_ACTIONS>,
pub on_exit: Vec<Action, MAX_ACTIONS>,
pub triggers: Vec<Trigger, MAX_TRIGGERS>,
}Fields§
§name: Label§encoders: Vec<EncoderConfig, E>§analog: Vec<AnalogConfig, A>§defaults: InitialState<B, E>Initial state applied on first boot / after upload (before any user interaction).
on_enter: Vec<Action, MAX_ACTIONS>Actions fired when this preset becomes active (on switch or boot).
on_exit: Vec<Action, MAX_ACTIONS>Actions fired when leaving this preset (before switching to another).
triggers: Vec<Trigger, MAX_TRIGGERS>Incoming MIDI triggers: react to external messages by changing state or firing actions.
Trait Implementations§
Source§impl<'de, const B: usize, const E: usize, const A: usize> Deserialize<'de> for Preset<B, E, A>
impl<'de, const B: usize, const E: usize, const A: usize> Deserialize<'de> for Preset<B, E, A>
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
impl<const B: usize, const E: usize, const A: usize> Eq for Preset<B, E, A>
Source§impl<const B: usize, const E: usize, const A: usize> PartialEq for Preset<B, E, A>
impl<const B: usize, const E: usize, const A: usize> PartialEq for Preset<B, E, A>
impl<const B: usize, const E: usize, const A: usize> StructuralPartialEq for Preset<B, E, A>
Auto Trait Implementations§
impl<const B: usize, const E: usize, const A: usize> Freeze for Preset<B, E, A>
impl<const B: usize, const E: usize, const A: usize> RefUnwindSafe for Preset<B, E, A>
impl<const B: usize, const E: usize, const A: usize> Send for Preset<B, E, A>
impl<const B: usize, const E: usize, const A: usize> Sync for Preset<B, E, A>
impl<const B: usize, const E: usize, const A: usize> Unpin for Preset<B, E, A>
impl<const B: usize, const E: usize, const A: usize> UnsafeUnpin for Preset<B, E, A>
impl<const B: usize, const E: usize, const A: usize> UnwindSafe for Preset<B, E, A>
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