pub struct Attachments {
pub items: Vec<CTAttachment>,
}Expand description
对应 Java: org.ofdrw.core.attachment.Attachments
附件根容器,对应 Attachments.xml,包含文档中所有附件。
Fields§
§items: Vec<CTAttachment>文档中所有附件列表。
Implementations§
Source§impl Attachments
impl Attachments
Sourcepub fn add_attachment(self, attachment: CTAttachment) -> Self
pub fn add_attachment(self, attachment: CTAttachment) -> Self
添加附件。
Sourcepub fn to_xml_string(&self) -> String
pub fn to_xml_string(&self) -> String
序列化为 XML 字符串。
Trait Implementations§
Source§impl Clone for Attachments
impl Clone for Attachments
Source§fn clone(&self) -> Attachments
fn clone(&self) -> Attachments
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 Attachments
impl Debug for Attachments
Source§impl Default for Attachments
impl Default for Attachments
Source§impl XmlElement for Attachments
impl XmlElement for Attachments
Source§fn element_name(&self) -> &'static str
fn element_name(&self) -> &'static str
对应 Java: org.ofdrw.core.attachment.Attachments
Source§fn child_nodes(&self) -> Vec<XmlNode>
fn child_nodes(&self) -> Vec<XmlNode>
子元素(作为
XmlNode 提供,便于嵌套序列化)。Source§fn from_xml(node: &XmlNode) -> Result<Self, XmlElementError>
fn from_xml(node: &XmlNode) -> Result<Self, XmlElementError>
从节点树解析(对应 ofdrw 解析侧;quick-xml 产物)。 Read more
Source§fn text_content(&self) -> Option<&str>
fn text_content(&self) -> Option<&str>
文本内容(简单文本元素)。
Auto Trait Implementations§
impl Freeze for Attachments
impl RefUnwindSafe for Attachments
impl Send for Attachments
impl Sync for Attachments
impl Unpin for Attachments
impl UnsafeUnpin for Attachments
impl UnwindSafe for Attachments
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