1 2 3 4 5 6 7 8 9 10 11 12
use thiserror::Error; pub type Result<T, E = Error> = std::result::Result<T, E>; #[derive(Debug, Error)] pub enum Error { #[error("日志系统初始化失败:{0}")] InitFailed(String), #[error(transparent)] Anyhow(#[from] anyhow::Error), }