1 2 3 4 5 6 7 8 9 10 11 12
//! 错误类型定义 use thiserror::Error; /// DOCX 处理错误类型 #[derive(Error, Debug)] pub enum DocxError { #[error("无效的 DOCX 文件格式")] InvalidZipFormat, #[error("{0}")] TemplateRenderError(String), }