Enum tune::mts::ScaleOctaveTuningError
source · [−]pub enum ScaleOctaveTuningError {
ChannelOutOfRange,
}
Expand description
Creating a ScaleOctaveTuningMessage
failed.
Variants
ChannelOutOfRange
A channel number exceeds the allowed range [0..16).
Examples
// Channels 14 and 15 are valid
let options = ScaleOctaveTuningOptions {
channels: HashSet::from([14, 15]).into(),
..Default::default()
};
assert!(matches!(
ScaleOctaveTuningMessage::from_octave_tuning(&options, &Default::default()),
Ok(_)
));
// Channel 16 is invalid
let options = ScaleOctaveTuningOptions {
channels: HashSet::from([14, 15, 16]).into(),
..Default::default()
};
assert!(matches!(
ScaleOctaveTuningMessage::from_octave_tuning(&options, &Default::default()),
Err(ScaleOctaveTuningError::ChannelOutOfRange)
));
Trait Implementations
sourceimpl Clone for ScaleOctaveTuningError
impl Clone for ScaleOctaveTuningError
sourcefn clone(&self) -> ScaleOctaveTuningError
fn clone(&self) -> ScaleOctaveTuningError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ScaleOctaveTuningError
impl Debug for ScaleOctaveTuningError
impl Copy for ScaleOctaveTuningError
impl Eq for ScaleOctaveTuningError
impl StructuralEq for ScaleOctaveTuningError
impl StructuralPartialEq for ScaleOctaveTuningError
Auto Trait Implementations
impl RefUnwindSafe for ScaleOctaveTuningError
impl Send for ScaleOctaveTuningError
impl Sync for ScaleOctaveTuningError
impl Unpin for ScaleOctaveTuningError
impl UnwindSafe for ScaleOctaveTuningError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more