Enum tune::mts::ScaleOctaveTuningError[][src]

pub enum ScaleOctaveTuningError {
    DetuningOutOfRange,
    ChannelOutOfRange,
}

Variants

DetuningOutOfRange

The tuning of a note exceeds the allowed range [-64..=63] cents.

ChannelOutOfRange

A channel number exceeds the allowed range [0..16).

Examples

let only_valid_channels = HashSet::from_iter([14, 15].iter().copied());
assert!(matches!(
    ScaleOctaveTuningMessage::from_scale_octave_tuning(
        &Default::default(), only_valid_channels, Default::default(),
    ),
    Ok(_)
));

let channel_16_is_invalid = HashSet::from_iter([14, 15, 16].iter().copied());
assert!(matches!(
    ScaleOctaveTuningMessage::from_scale_octave_tuning(
        &Default::default(), channel_16_is_invalid, Default::default(),
    ),
    Err(ScaleOctaveTuningError::ChannelOutOfRange)
));

Trait Implementations

impl Clone for ScaleOctaveTuningError[src]

impl Copy for ScaleOctaveTuningError[src]

impl Debug for ScaleOctaveTuningError[src]

impl Eq for ScaleOctaveTuningError[src]

impl PartialEq<ScaleOctaveTuningError> for ScaleOctaveTuningError[src]

impl StructuralEq for ScaleOctaveTuningError[src]

impl StructuralPartialEq for ScaleOctaveTuningError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.