pub struct InitialState {
pub button_active: Vec<bool, MAX_BUTTONS>,
pub encoder_values: Vec<u8, MAX_ENCODERS>,
}Expand description
Default toggle/radio/encoder state for a preset on first activation.
Fields§
Which buttons start active (true = on). Length matches buttons vec.
encoder_values: Vec<u8, MAX_ENCODERS>Initial encoder values (0-127). Length matches encoders vec.
Trait Implementations§
Source§impl Clone for InitialState
impl Clone for InitialState
Source§fn clone(&self) -> InitialState
fn clone(&self) -> InitialState
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 InitialState
impl Debug for InitialState
Source§impl Default for InitialState
impl Default for InitialState
Source§fn default() -> InitialState
fn default() -> InitialState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InitialState
impl<'de> Deserialize<'de> for InitialState
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 Eq for InitialState
Source§impl PartialEq for InitialState
impl PartialEq for InitialState
Source§fn eq(&self, other: &InitialState) -> bool
fn eq(&self, other: &InitialState) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InitialState
impl Serialize for InitialState
impl StructuralPartialEq for InitialState
Auto Trait Implementations§
impl Freeze for InitialState
impl RefUnwindSafe for InitialState
impl Send for InitialState
impl Sync for InitialState
impl Unpin for InitialState
impl UnsafeUnpin for InitialState
impl UnwindSafe for InitialState
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