pub struct Res {
pub base_loc: Option<ST_Loc>,
pub resources: Vec<String>,
}Expand description
资源文件。
资源是绘制图元时所需数据(如绘制参数、颜色空间、字形、图像、音视频等)的集合。 对应 GB/T 33190-2016 第 7.9 节。
对应 Java: org.ofdrw.core.basicStructure.res.Res
Fields§
§base_loc: Option<ST_Loc>此资源文件的通用数据存储路径。
resources: Vec<String>资源列表(XML 片段)。
Implementations§
Trait Implementations§
Source§impl XmlElement for Res
impl XmlElement for Res
Source§fn element_name(&self) -> &'static str
fn element_name(&self) -> &'static str
对应 Java: org.ofdrw.core.basicStructure.res.Res
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 Res
impl RefUnwindSafe for Res
impl Send for Res
impl Sync for Res
impl Unpin for Res
impl UnsafeUnpin for Res
impl UnwindSafe for Res
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