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:elements or variants contained in this enum
allow_any: boolWhether 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: boolWhether 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 is_complex(&self) -> bool
pub fn is_complex(&self) -> bool
true if the type is a complex type, false otherwise.
Sourcepub fn is_dynamic(&self) -> bool
pub fn is_dynamic(&self) -> bool
true if the type is dynamic, false otherwise.
Sourcepub fn is_content(&self) -> bool
pub fn is_content(&self) -> bool
true if the type is the content type of another complex type.
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