pub struct MetronomeSettings { /* private fields */ }
Expand description
Represents the metronome settings menu.
Implementations§
source§impl MetronomeSettings
impl MetronomeSettings
sourcepub fn set_active(&mut self, active: bool)
pub fn set_active(&mut self, active: bool)
Turns metronome on or off.
sourcepub fn set_time_signature(&mut self, time_signature: TimeSignature)
pub fn set_time_signature(&mut self, time_signature: TimeSignature)
Sets the time signature of the metronome.
sourcepub fn set_pre_roll_bars(
&mut self,
pre_roll_bars: usize
) -> Result<(), RytmError>
pub fn set_pre_roll_bars( &mut self, pre_roll_bars: usize ) -> Result<(), RytmError>
Sets the number of bars to pre-roll.
Range: 0..=16
Numbers represent bars, 0
bars means no pre-roll.
sourcepub fn set_volume(&mut self, volume: usize) -> Result<(), RytmError>
pub fn set_volume(&mut self, volume: usize) -> Result<(), RytmError>
Sets the volume of the metronome.
sourcepub const fn time_signature(&self) -> TimeSignature
pub const fn time_signature(&self) -> TimeSignature
Returns the time signature of the metronome.
sourcepub const fn pre_roll_bars(&self) -> usize
pub const fn pre_roll_bars(&self) -> usize
Returns the number of bars to pre-roll.
Range: 0..=16
Numbers represent bars, 0
bars means no pre-roll.
Trait Implementations§
source§impl Clone for MetronomeSettings
impl Clone for MetronomeSettings
source§fn clone(&self) -> MetronomeSettings
fn clone(&self) -> MetronomeSettings
Returns a copy 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 Debug for MetronomeSettings
impl Debug for MetronomeSettings
source§impl Default for MetronomeSettings
impl Default for MetronomeSettings
source§impl<'de> Deserialize<'de> for MetronomeSettings
impl<'de> Deserialize<'de> for MetronomeSettings
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 Hash for MetronomeSettings
impl Hash for MetronomeSettings
source§impl Ord for MetronomeSettings
impl Ord for MetronomeSettings
source§fn cmp(&self, other: &MetronomeSettings) -> Ordering
fn cmp(&self, other: &MetronomeSettings) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for MetronomeSettings
impl PartialEq for MetronomeSettings
source§fn eq(&self, other: &MetronomeSettings) -> bool
fn eq(&self, other: &MetronomeSettings) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MetronomeSettings
impl PartialOrd for MetronomeSettings
source§fn partial_cmp(&self, other: &MetronomeSettings) -> Option<Ordering>
fn partial_cmp(&self, other: &MetronomeSettings) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for MetronomeSettings
impl Serialize for MetronomeSettings
source§impl TryFrom<&ar_global_t> for MetronomeSettings
impl TryFrom<&ar_global_t> for MetronomeSettings
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
impl Copy for MetronomeSettings
impl Eq for MetronomeSettings
impl StructuralEq for MetronomeSettings
impl StructuralPartialEq for MetronomeSettings
Auto Trait Implementations§
impl RefUnwindSafe for MetronomeSettings
impl Send for MetronomeSettings
impl Sync for MetronomeSettings
impl Unpin for MetronomeSettings
impl UnwindSafe for MetronomeSettings
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