pub trait OfdElement {
// Required method
fn ofd_element_name(&self) -> &'static str;
// Provided methods
fn ofd_attributes(&self) -> Vec<(String, String)> { ... }
fn to_ofd_xml(&self) -> String { ... }
}Expand description
OFD 元素公共特征。
对应 Java: org.ofdrw.core.OFDElement
实现此 trait 的类型表示一个 OFD XML 元素,可以获取元素名称、 属性列表和子元素列表,以及序列化为 XML 字符串。
Required Methods§
Sourcefn ofd_element_name(&self) -> &'static str
fn ofd_element_name(&self) -> &'static str
获取 OFD XML 元素名称(不含命名空间前缀)。
Provided Methods§
Sourcefn ofd_attributes(&self) -> Vec<(String, String)>
fn ofd_attributes(&self) -> Vec<(String, String)>
获取元素的属性列表(键值对)。
Sourcefn to_ofd_xml(&self) -> String
fn to_ofd_xml(&self) -> String
序列化为 OFD XML 字符串(含命名空间前缀)。
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".