pub struct NotesMaster {
pub shapes: Vec<Sp>,
pub background: Option<SlideBackground>,
pub clr_map_xml: Option<String>,
pub notes_style_xml: Option<String>,
}Expand description
<p:notesMaster> 的内存模型。
承载 cSld/spTree 内的形状列表 + 可选背景 + clrMap/notesStyle 原始 XML。
读写双向支持:from_opc 解析时回填,to_opc_package 写出时调用 NotesMaster::to_xml。
Fields§
§shapes: Vec<Sp>备注母版中的形状列表(<p:cSld>/<p:spTree> 内的 <p:sp>)。
background: Option<SlideBackground>备注母版背景(<p:bg>,可选)。None 表示使用默认背景。
clr_map_xml: Option<String>原始 <p:clrMap> XML 字符串(round-trip 保真)。
None 时 NotesMaster::to_xml 使用 [DEFAULT_CLR_MAP]。
Some 时直接 raw 输出原始 XML,确保读→写不漂移。
notes_style_xml: Option<String>原始 <p:notesStyle> XML 字符串(round-trip 保真)。
None 时 NotesMaster::to_xml 使用 [DEFAULT_NOTES_STYLE]。
Some 时直接 raw 输出原始 XML,确保读→写不漂移。
Implementations§
Source§impl NotesMaster
impl NotesMaster
Sourcepub fn to_xml(&self) -> String
pub fn to_xml(&self) -> String
写出 <p:notesMaster> 完整 XML(notesMasterN.xml 内容)。
§元素结构(OOXML 严格顺序)
<p:notesMaster xmlns:a=... xmlns:p=... xmlns:r=...>
<p:cSld>
<p:bg>?</p:bg> 可选背景
<p:spTree>...</p:spTree> 形状树
</p:cSld>
<p:clrMap .../> 颜色映射(优先用 clr_map_xml,否则默认)
<p:notesStyle>...</p:notesStyle> 备注文本样式(优先用 notes_style_xml,否则默认)
</p:notesMaster>§与 python-pptx 的对应
python-pptx 不直接生成 notesMaster XML(仅读取),本库为 round-trip 保真实现写路径。
Trait Implementations§
Source§impl Clone for NotesMaster
impl Clone for NotesMaster
Source§fn clone(&self) -> NotesMaster
fn clone(&self) -> NotesMaster
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NotesMaster
impl Debug for NotesMaster
Source§impl Default for NotesMaster
impl Default for NotesMaster
Source§fn default() -> NotesMaster
fn default() -> NotesMaster
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NotesMaster
impl RefUnwindSafe for NotesMaster
impl Send for NotesMaster
impl Sync for NotesMaster
impl Unpin for NotesMaster
impl UnsafeUnpin for NotesMaster
impl UnwindSafe for NotesMaster
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