pub enum TimeSignature {
Show 80 variants _1B1, _2B1, _3B1, _4B1, _5B1, _6B1, _7B1, _8B1, _9B1, _10B1, _11B1, _12B1, _13B1, _14B1, _15B1, _16B1, _1B2, _2B2, _3B2, _4B2, _5B2, _6B2, _7B2, _8B2, _9B2, _10B2, _11B2, _12B2, _13B2, _14B2, _15B2, _16B2, _1B4, _2B4, _3B4, _4B4, _5B4, _6B4, _7B4, _8B4, _9B4, _10B4, _11B4, _12B4, _13B4, _14B4, _15B4, _16B4, _1B8, _2B8, _3B8, _4B8, _5B8, _6B8, _7B8, _8B8, _9B8, _10B8, _11B8, _12B8, _13B8, _14B8, _15B8, _16B8, _1B16, _2B16, _3B16, _4B16, _5B16, _6B16, _7B16, _8B16, _9B16, _10B16, _11B16, _12B16, _13B16, _14B16, _15B16, _16B16,
}
Expand description

An enum which represents a time signature in the metronome settings menu.

Variants§

§

_1B1

1/1

§

_2B1

2/1

§

_3B1

3/1

§

_4B1

4/1

§

_5B1

5/1

§

_6B1

6/1

§

_7B1

7/1

§

_8B1

8/1

§

_9B1

9/1

§

_10B1

10/1

§

_11B1

11/1

§

_12B1

12/1

§

_13B1

13/1

§

_14B1

14/1

§

_15B1

15/1

§

_16B1

16/1

§

_1B2

1/2

§

_2B2

2/2

§

_3B2

3/2

§

_4B2

4/2

§

_5B2

5/2

§

_6B2

6/2

§

_7B2

7/2

§

_8B2

8/2

§

_9B2

9/2

§

_10B2

10/2

§

_11B2

11/2

§

_12B2

12/2

§

_13B2

13/2

§

_14B2

14/2

§

_15B2

15/2

§

_16B2

16/2

§

_1B4

1/4

§

_2B4

2/4

§

_3B4

3/4

§

_4B4

4/4

§

_5B4

5/4

§

_6B4

6/4

§

_7B4

7/4

§

_8B4

8/4

§

_9B4

9/4

§

_10B4

10/4

§

_11B4

11/4

§

_12B4

12/4

§

_13B4

13/4

§

_14B4

14/4

§

_15B4

15/4

§

_16B4

16/4

§

_1B8

1/8

§

_2B8

2/8

§

_3B8

3/8

§

_4B8

4/8

§

_5B8

5/8

§

_6B8

6/8

§

_7B8

7/8

§

_8B8

8/8

§

_9B8

9/8

§

_10B8

10/8

§

_11B8

11/8

§

_12B8

12/8

§

_13B8

13/8

§

_14B8

14/8

§

_15B8

15/8

§

_16B8

16/8

§

_1B16

1/16

§

_2B16

2/16

§

_3B16

3/16

§

_4B16

4/16

§

_5B16

5/16

§

_6B16

6/16

§

_7B16

7/16

§

_8B16

8/16

§

_9B16

9/16

§

_10B16

10/16

§

_11B16

11/16

§

_12B16

12/16

§

_13B16

13/16

§

_14B16

14/16

§

_15B16

15/16

§

_16B16

16/16

Implementations§

source§

impl TimeSignature

source

pub fn numerator(&self) -> usize

Returns the numerator of the time signature.

source

pub fn denominator(&self) -> usize

Returns the denominator of the time signature.

source

pub fn as_tuple(&self) -> (usize, usize)

Returns the time signature as a tuple of (numerator, denominator).

Trait Implementations§

source§

impl Clone for TimeSignature

source§

fn clone(&self) -> TimeSignature

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 TimeSignature

source§

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

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

impl Default for TimeSignature

source§

fn default() -> TimeSignature

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TimeSignature

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<&TimeSignature> for (u8, u8)

source§

fn from(ts: &TimeSignature) -> Self

Converts to this type from the input type.
source§

impl From<TimeSignature> for &str

source§

fn from(ts: TimeSignature) -> Self

Converts to this type from the input type.
source§

impl Hash for TimeSignature

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for TimeSignature

source§

fn cmp(&self, other: &TimeSignature) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for TimeSignature

source§

fn eq(&self, other: &TimeSignature) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for TimeSignature

source§

fn partial_cmp(&self, other: &TimeSignature) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for TimeSignature

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 TryFrom<&str> for TimeSignature

§

type Error = ConversionError

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

fn try_from(ts: &str) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<(u8, u8)> for TimeSignature

§

type Error = ConversionError

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

fn try_from((num, den): (u8, u8)) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for TimeSignature

source§

impl Eq for TimeSignature

source§

impl StructuralEq for TimeSignature

source§

impl StructuralPartialEq for TimeSignature

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>,