pub struct InitialState<const B: usize = MAX_BUTTONS, const E: usize = MAX_ENCODERS> {
pub button_active: Vec<bool, B>,
pub encoder_values: Vec<u8, E>,
}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, E>Initial encoder values (0-127). Length matches encoders vec.
Trait Implementations§
Source§impl<const B: usize, const E: usize> Clone for InitialState<B, E>
impl<const B: usize, const E: usize> Clone for InitialState<B, E>
Source§fn clone(&self) -> InitialState<B, E>
fn clone(&self) -> InitialState<B, E>
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<const B: usize, const E: usize> Default for InitialState<B, E>
impl<const B: usize, const E: usize> Default for InitialState<B, E>
Source§fn default() -> InitialState<B, E>
fn default() -> InitialState<B, E>
Returns the “default value” for a type. Read more
Source§impl<'de, const B: usize, const E: usize> Deserialize<'de> for InitialState<B, E>
impl<'de, const B: usize, const E: usize> Deserialize<'de> for InitialState<B, E>
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> Eq for InitialState<B, E>
Source§impl<const B: usize, const E: usize> PartialEq for InitialState<B, E>
impl<const B: usize, const E: usize> PartialEq for InitialState<B, E>
Source§fn eq(&self, other: &InitialState<B, E>) -> bool
fn eq(&self, other: &InitialState<B, E>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<const B: usize, const E: usize> StructuralPartialEq for InitialState<B, E>
Auto Trait Implementations§
impl<const B: usize, const E: usize> Freeze for InitialState<B, E>
impl<const B: usize, const E: usize> RefUnwindSafe for InitialState<B, E>
impl<const B: usize, const E: usize> Send for InitialState<B, E>
impl<const B: usize, const E: usize> Sync for InitialState<B, E>
impl<const B: usize, const E: usize> Unpin for InitialState<B, E>
impl<const B: usize, const E: usize> UnsafeUnpin for InitialState<B, E>
impl<const B: usize, const E: usize> UnwindSafe for InitialState<B, E>
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