devela/media/midi/
error.rs

1// devela::media::midi::error
2//
3//!
4//
5
6#[doc = crate::TAG_RESULT!()]
7/// A midi-related result.
8pub type MidiResult<T> = crate::Result<T, MidiError>;
9
10#[doc = crate::TAG_ERROR_COMPOSITE!()]
11/// A midi-related error.
12#[non_exhaustive]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
14pub enum MidiError {
15    /// TEMP
16    MidiError,
17}
18
19mod core_impls {
20    use crate::{Display, FmtResult, Formatter, MidiError};
21
22    impl crate::Error for MidiError {}
23    impl crate::ExtError for MidiError {
24        type Kind = ();
25        fn error_eq(&self, other: &Self) -> bool {
26            self == other
27        }
28        fn error_kind(&self) -> Self::Kind {}
29    }
30
31    impl Display for MidiError {
32        fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult<()> {
33            write![f, "MidiError"]
34        }
35    }
36}