pub struct Global { /* private fields */ }
Expand description
Represents a global in the analog rytm.
It does not map identically to the structure in the firmware.
Globals are global settings which you may found in the settings menu of the device.
Implementations§
source§impl Global
impl Global
sourcepub fn try_default(global_slot: usize) -> Result<Self, RytmError>
pub fn try_default(global_slot: usize) -> Result<Self, RytmError>
Makes a new global complying to project defaults.
Accepts a global slot index in the range of 0..=3
.
sourcepub fn work_buffer_default() -> Self
pub fn work_buffer_default() -> Self
Makes a new global in the work buffer complying to project defaults as if it comes from the work buffer.
sourcepub const fn structure_version(&self) -> u32
pub const fn structure_version(&self) -> u32
Returns the version of the global structure.
sourcepub const fn is_work_buffer(&self) -> bool
pub const fn is_work_buffer(&self) -> bool
Checks if this global is the global at work buffer.
sourcepub const fn metronome_settings(&self) -> &MetronomeSettings
pub const fn metronome_settings(&self) -> &MetronomeSettings
Returns the metronome settings.
sourcepub fn metronome_settings_mut(&mut self) -> &mut MetronomeSettings
pub fn metronome_settings_mut(&mut self) -> &mut MetronomeSettings
Returns the metronome settings mutably.
sourcepub const fn midi_config(&self) -> &MidiConfig
pub const fn midi_config(&self) -> &MidiConfig
Returns the midi config.
sourcepub fn midi_config_mut(&mut self) -> &mut MidiConfig
pub fn midi_config_mut(&mut self) -> &mut MidiConfig
Returns the midi config mutably.
sourcepub const fn sequencer_config(&self) -> &SequencerConfig
pub const fn sequencer_config(&self) -> &SequencerConfig
Returns the sequencer config.
sourcepub fn sequencer_config_mut(&mut self) -> &mut SequencerConfig
pub fn sequencer_config_mut(&mut self) -> &mut SequencerConfig
Returns the sequencer config mutably.
sourcepub fn routing_mut(&mut self) -> &mut Routing
pub fn routing_mut(&mut self) -> &mut Routing
Returns the routing mutably.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Global
impl<'de> Deserialize<'de> for Global
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
source§impl From<&Global> for ar_global_t
impl From<&Global> for ar_global_t
source§impl SysexCompatible for Global
impl SysexCompatible for Global
impl Copy for Global
Auto Trait Implementations§
impl RefUnwindSafe for Global
impl Send for Global
impl Sync for Global
impl Unpin for Global
impl UnwindSafe for Global
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