Struct rytm_rs::object::global::Global

source ·
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

source

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.

source

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.

source

pub const fn structure_version(&self) -> u32

Returns the version of the global structure.

source

pub const fn is_work_buffer(&self) -> bool

Checks if this global is the global at work buffer.

source

pub const fn index(&self) -> usize

Returns the global slot index.

source

pub const fn metronome_settings(&self) -> &MetronomeSettings

Returns the metronome settings.

source

pub fn metronome_settings_mut(&mut self) -> &mut MetronomeSettings

Returns the metronome settings mutably.

source

pub const fn midi_config(&self) -> &MidiConfig

Returns the midi config.

source

pub fn midi_config_mut(&mut self) -> &mut MidiConfig

Returns the midi config mutably.

source

pub const fn sequencer_config(&self) -> &SequencerConfig

Returns the sequencer config.

source

pub fn sequencer_config_mut(&mut self) -> &mut SequencerConfig

Returns the sequencer config mutably.

source

pub const fn routing(&self) -> &Routing

Returns the routing.

source

pub fn routing_mut(&mut self) -> &mut Routing

Returns the routing mutably.

Trait Implementations§

source§

impl Clone for Global

source§

fn clone(&self) -> Global

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Global

source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Global

source§

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

source§

fn from(global: &Global) -> Self

Converts to this type from the input type.
source§

impl Serialize for Global

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl SysexCompatible for Global

source§

fn as_sysex(&self) -> Result<Vec<u8>, RytmError>

Serializes the object to a sysex message. Read more
source§

fn sysex_type(&self) -> AnySysexType

Returns the sysex type of the object.
source§

impl Copy for Global

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,