Skip to main content

easydoc_reader/view/
view_mode.rs

1//! 视图模式枚举定义。
2
3/// 选择如何将 [`DocumentContent`](easydoc_core::DocumentContent) 渲染为字符串。
4#[derive(Debug, Clone, PartialEq, Eq)]
5#[non_exhaustive]
6pub enum ViewMode {
7    /// 纯文本:段落以换行连接,表格以逗号分隔。
8    Plain,
9    /// 结构化标注(例如 `[段落 3]`、`[表格 1: 2行x3列]`)。
10    Annotated,
11    /// 仅标题,Markdown 风格。
12    Outline {
13        /// 要包含的最大标题级别(1--6)。超过此级别的标题将被省略。
14        max_level: u8,
15    },
16    /// 聚合统计:段落/表格/图片/字数计数。
17    Stats,
18}