pub trait Element: Base {
// Required methods
fn id(&self) -> Option<&String>;
fn set_id<T: Into<String>>(self, id: T) -> Self;
fn extensions(&self) -> Option<&Vec<Extension>>;
fn set_extensions(self, ext: Vec<Extension>) -> Self;
fn add_extension(self, ext: Extension) -> Self;
}
Expand description
所有数据元素的基类型,继承自Base
Required Methods§
fn id(&self) -> Option<&String>
fn set_id<T: Into<String>>(self, id: T) -> Self
fn extensions(&self) -> Option<&Vec<Extension>>
fn set_extensions(self, ext: Vec<Extension>) -> Self
fn add_extension(self, ext: Extension) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.