aliyun_error/
display.rs

1use crate::{AliError, AliErrorKind};
2use std::{
3    error::Error,
4    fmt::{Debug, Display, Formatter},
5};
6
7impl Error for AliError {}
8
9impl Debug for AliError {
10    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
11        Debug::fmt(&self.kind, f)
12    }
13}
14
15impl Display for AliError {
16    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
17        Display::fmt(&self.kind, f)
18    }
19}
20
21impl Display for AliErrorKind {
22    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
23        match self {
24            AliErrorKind::UnknownError => {
25                write!(f, "UnknownError")
26            }
27        }
28    }
29}