lesscode 0.1.4

低代码工具包
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::error::Error;
use std::fmt;
use std::fmt::{Display, Formatter};

#[derive(Debug)]
pub struct UnsupportedTypeError {
    pub  code: String,
    pub message: String,
}

impl Error for UnsupportedTypeError {}

impl Display for UnsupportedTypeError {
    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
        match self { UnsupportedTypeError { code, message } => { write!(f, "ErrorCode: {},message: {}", code, message) } }
    }
}