office-rs 0.1.1

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

/// Word特定错误
#[derive(Error, Debug)]
pub enum DocxError {
    #[error("样式不存在: {style_id}")] StyleNotFound {
        style_id: String,
    },

    #[error("表格结构无效")]
    InvalidTableStructure,

    #[error("段落格式错误: {reason}")] InvalidParagraphFormat {
        reason: String,
    },

    #[error("书签不存在: {bookmark}")] BookmarkNotFound {
        bookmark: String,
    },
}