#[non_exhaustive]pub enum MtcError {
MalformedMessage,
InvalidTimecode(TimecodeError),
NoRateCode,
}Expand description
An error from decoding or encoding MIDI Time Code.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MalformedMessage
A quarter-frame or full-frame message has the wrong length, framing or a data byte with its high bit set.
InvalidTimecode(TimecodeError)
A complete message names a position that does not exist at its frame rate, such as hour 24 or a skipped drop-frame label.
NoRateCode
MIDI Time Code has rate codes only for 24, 25 and 30 frame labels per second, so 48 and faster rates cannot be sent.
Trait Implementations§
impl Copy for MtcError
impl Eq for MtcError
Source§impl Error for MtcError
impl Error for MtcError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for MtcError
Auto Trait Implementations§
impl Freeze for MtcError
impl RefUnwindSafe for MtcError
impl Send for MtcError
impl Sync for MtcError
impl Unpin for MtcError
impl UnsafeUnpin for MtcError
impl UnwindSafe for MtcError
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