office-rs 0.1.1

A Rust library for reading and writing XML Office files
Documentation
use thiserror::Error;

/// 文件相关错误
#[derive(Error, Debug)]
pub enum FileError {
    #[error("文件不存在: {path}")] NotFound {
        path: String,
    },

    #[error("文件权限不足: {path}")] PermissionDenied {
        path: String,
    },

    #[error("文件已损坏: {path}")] Corrupted {
        path: String,
    },

    #[error("文件格式不正确: {path}")] InvalidFormat {
        path: String,
    },
}