pub struct ComplexDataEnum<'types> {
pub base: ComplexBase<'types>,
pub elements: Vec<ComplexDataElement<'types>>,
pub allow_any: bool,
pub allow_any_attribute: bool,
}
Expand description
Represents a rust enum.
Is used as part of the ComplexData
.
Fields§
§base: ComplexBase<'types>
Basic type information.
elements: Vec<ComplexDataElement<'types>>
List of xs:element
s or variants contained in this enum
allow_any: bool
Whether any kind of element is allowed in the enum or not
This is only true if no type for xs:any
element is defined.
allow_any_attribute: bool
Whether any kind of attribute is allowed in the enum or not
This is only true if no type for xs:anyAttribute
element is defined.
Methods from Deref<Target = ComplexBase<'types>>§
Sourcepub fn element_tag(&self) -> Option<&TagName<'types>>
pub fn element_tag(&self) -> Option<&TagName<'types>>
Returns the name of the element tag, if type is represented by a XML element.
Sourcepub fn represents_element(&self) -> bool
pub fn represents_element(&self) -> bool
Returns true
if this type represents an element, false
otherwise.
Trait Implementations§
Source§impl<'types> Debug for ComplexDataEnum<'types>
impl<'types> Debug for ComplexDataEnum<'types>
Auto Trait Implementations§
impl<'types> Freeze for ComplexDataEnum<'types>
impl<'types> RefUnwindSafe for ComplexDataEnum<'types>
impl<'types> !Send for ComplexDataEnum<'types>
impl<'types> !Sync for ComplexDataEnum<'types>
impl<'types> Unpin for ComplexDataEnum<'types>
impl<'types> UnwindSafe for ComplexDataEnum<'types>
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