devela/media/draw/
error.rs

1// devela::media::draw::error
2//
3//!
4//
5
6#[doc = crate::TAG_RESULT!()]
7/// A drawing-related result.
8pub type DrawResult<T> = crate::Result<T, DrawError>;
9
10#[doc = crate::TAG_ERROR_COMPOSITE!()]
11/// A drawing-related error.
12#[non_exhaustive]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
14pub enum DrawError {
15    /// TEMP
16    DrawError,
17}
18
19mod core_impls {
20    use crate::{Display, DrawError, FmtResult, Formatter};
21
22    impl crate::Error for DrawError {}
23    impl crate::ExtError for DrawError {
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 DrawError {
32        fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult<()> {
33            write![f, "DrawError"]
34        }
35    }
36}