pub struct CommandPack {
pub instr: &'static [&'static str],
pub mod_commands: [&'static [&'static str]; 4],
}
Expand description
This structure will aggregate for every instrument and its modulator the name of the commands associated to it.
Fields§
§instr: &'static [&'static str]
Instruments command
mod_commands: [&'static [&'static str]; 4]
For all the modulators, their respective command names
Implementations§
Source§impl CommandPack
impl CommandPack
Sourcepub const INSTRUMENT_COMMAND_OFFSET: usize = 128usize
pub const INSTRUMENT_COMMAND_OFFSET: usize = 128usize
Instrument specific command start at 0x80
Sourcepub const BASE_INSTRUMENT_COMMAND_COUNT: usize = 18usize
pub const BASE_INSTRUMENT_COMMAND_COUNT: usize = 18usize
If we are below INSTRUMENT_COMMAND_OFFSET + this number, we will access to CommandPack::instr array, for instrument specific command.
Sourcepub const BASE_INSTRUMENT_COMMAND_END: usize = 148usize
pub const BASE_INSTRUMENT_COMMAND_END: usize = 148usize
Last base instrument command index.
Sourcepub fn accepts(self, cmd: u8) -> bool
pub fn accepts(self, cmd: u8) -> bool
Does this command pack can render properly a given command.
pub fn try_render(self, cmd: u8) -> Option<&'static str>
Trait Implementations§
Source§impl Clone for CommandPack
impl Clone for CommandPack
Source§fn clone(&self) -> CommandPack
fn clone(&self) -> CommandPack
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for CommandPack
impl Default for CommandPack
impl Copy for CommandPack
Auto Trait Implementations§
impl Freeze for CommandPack
impl RefUnwindSafe for CommandPack
impl Send for CommandPack
impl Sync for CommandPack
impl Unpin for CommandPack
impl UnwindSafe for CommandPack
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