office-rs 0.1.1

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

/// 解析相关错误
#[derive(Error, Debug)]
pub enum ParseError {
    #[error("缺少必需元素: {element}")] MissingElement {
        element: String,
    },

    #[error("无效的属性值: {attribute}={value}")] InvalidAttribute {
        attribute: String,
        value: String,
    },

    #[error("不支持的版本: {version}")] UnsupportedVersion {
        version: String,
    },

    #[error("无效的命名空间: {namespace}")] InvalidNamespace {
        namespace: String,
    },
}