pub struct DeviceState {Show 14 fields
pub firmware: Option<String>,
pub model_id: Option<String>,
pub product: Option<String>,
pub presets: Vec<Option<Preset>>,
pub current: Option<u8>,
pub live: Preset,
pub live_known: bool,
pub page: Option<Module>,
pub looper: Looper,
pub drum: Drum,
pub tuner: Tuner,
pub settings: Option<Settings>,
pub user_amps: [Option<String>; 10],
pub user_irs: [Option<String>; 10],
}Fields§
§firmware: Option<String>§model_id: Option<String>§product: Option<String>§presets: Vec<Option<Preset>>§current: Option<u8>Active preset index (0-based).
live: PresetThe live edit buffer: stored preset + every change since.
live_known: bool§page: Option<Module>§looper: Looper§drum: Drum§tuner: Tuner§settings: Option<Settings>§user_amps: [Option<String>; 10]§user_irs: [Option<String>; 10]Implementations§
Source§impl DeviceState
impl DeviceState
pub fn stored(&self, i: u8) -> Option<&Preset>
pub fn preset_name(&self, i: u8) -> Option<&str>
Sourcepub fn model_name(&self, m: Module, model: u8) -> String
pub fn model_name(&self, m: Module, model: u8) -> String
Model name for display, using user slot names where known.
Sourcepub fn apply(&mut self, bytes: &[u8], origin: Origin) -> Event
pub fn apply(&mut self, bytes: &[u8], origin: Origin) -> Event
Apply one complete MIDI message and describe it.
pub fn select_preset(&mut self, prog: u8)
Trait Implementations§
Source§impl Clone for DeviceState
impl Clone for DeviceState
Source§fn clone(&self) -> DeviceState
fn clone(&self) -> DeviceState
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 DeviceState
impl Debug for DeviceState
Auto Trait Implementations§
impl Freeze for DeviceState
impl RefUnwindSafe for DeviceState
impl Send for DeviceState
impl Sync for DeviceState
impl Unpin for DeviceState
impl UnsafeUnpin for DeviceState
impl UnwindSafe for DeviceState
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