pub struct DataTemplate { /* private fields */ }Expand description
ISO 23387 DataTemplateType.
The schema requires at least one of HasObjectTypeRef, HasPropertyRef
or HasGroupOfPropertiesRef, on top of the SubjectType requirement.
Implementations§
Source§impl DataTemplate
impl DataTemplate
Sourcepub fn to_element(&self) -> Element
pub fn to_element(&self) -> Element
Encodes as a global dt:DataTemplate element.
Source§impl DataTemplate
impl DataTemplate
Sourcepub fn from_element(element: &Element) -> Result<Self, CodecError>
pub fn from_element(element: &Element) -> Result<Self, CodecError>
Decodes DataTemplateType content (any element name).
Source§impl DataTemplate
impl DataTemplate
pub const fn new(subject: Subject) -> Self
pub const fn subject(&self) -> &Subject
Sourcepub fn subject_mut(&mut self) -> &mut Subject
pub fn subject_mut(&mut self) -> &mut Subject
Mutable access to the shared SubjectType core.
Sourcepub fn object_type_refs(&self) -> &[Reference]
pub fn object_type_refs(&self) -> &[Reference]
HasObjectTypeRef children; the schema permits any number.
pub fn add_object_type_ref(&mut self, value: Reference)
Sourcepub fn object_type_ref(&self) -> Option<&Reference>
👎Deprecated since 0.3.0: use object_type_refs
pub fn object_type_ref(&self) -> Option<&Reference>
use object_type_refs
The first HasObjectTypeRef, when present.
pub fn property_refs(&self) -> &[Reference]
pub fn add_property_ref(&mut self, value: Reference)
pub fn group_of_properties_refs(&self) -> &[Reference]
pub fn add_group_of_properties_ref(&mut self, value: Reference)
Sourcepub fn set_object_type_ref(&mut self, value: Option<Reference>)
👎Deprecated since 0.3.0: use add_object_type_ref
pub fn set_object_type_ref(&mut self, value: Option<Reference>)
use add_object_type_ref
Replaces every HasObjectTypeRef with value (none when None).
Trait Implementations§
Source§impl Clone for DataTemplate
impl Clone for DataTemplate
Source§fn clone(&self) -> DataTemplate
fn clone(&self) -> DataTemplate
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 DataTemplate
impl Debug for DataTemplate
impl Eq for DataTemplate
Source§impl PartialEq for DataTemplate
impl PartialEq for DataTemplate
impl StructuralPartialEq for DataTemplate
Auto Trait Implementations§
impl Freeze for DataTemplate
impl RefUnwindSafe for DataTemplate
impl Send for DataTemplate
impl Sync for DataTemplate
impl Unpin for DataTemplate
impl UnsafeUnpin for DataTemplate
impl UnwindSafe for DataTemplate
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