pub struct LayoutDef {
pub unique_id: Option<String>,
pub title: Option<String>,
pub desc: Option<String>,
pub categories: Vec<LayoutCategory>,
pub layout_node_xml: String,
}Expand description
SmartArt 布局定义(layout part 的半结构化表达)。
对应 /ppt/diagrams/layoutN.xml 的 <dgm:layoutDef> 根元素。
布局定义描述了 SmartArt 图形的拓扑算法(如线性/层次/循环/矩阵),
是 SmartArt 的“模板“。
§半结构化策略
layoutNode 算法树结构复杂(含 alg/forEach 嵌套),本结构仅提取顶层元数据 (uniqueId / title / desc / catLst),layoutNode 子树保留原始 XML。
Fields§
§unique_id: Option<String>唯一 ID(uniqueId 属性,用于跨 pptx 引用同一布局)。
title: Option<String>标题(<dgm:title val="..."/>)。
desc: Option<String>描述(<dgm:desc val="..."/>)。
categories: Vec<LayoutCategory>类别列表(<dgm:catLst>/<dgm:cat>)。
layout_node_xml: StringlayoutNode 子树原始 XML(<dgm:layoutNode>...</dgm:layoutNode> 整段)。
保留 byte-exact,避免重新序列化复杂的算法树。
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LayoutDef
impl RefUnwindSafe for LayoutDef
impl Send for LayoutDef
impl Sync for LayoutDef
impl Unpin for LayoutDef
impl UnsafeUnpin for LayoutDef
impl UnwindSafe for LayoutDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more