pub struct ElementMeta {
pub ident: Ident,
pub variant: ElementMetaVariant,
pub form: FormChoiceType,
pub min_occurs: MinOccurs,
pub max_occurs: MaxOccurs,
pub display_name: Option<String>,
pub documentation: Vec<String>,
}
Expand description
Type information that contains data about a element.
Fields§
§ident: Ident
Identifier of the element.
variant: ElementMetaVariant
Type of the element.
form: FormChoiceType
The form of this element.
min_occurs: MinOccurs
Minimum occurrence of the field.
max_occurs: MaxOccurs
Maximum occurrence of the field.
display_name: Option<String>
Name of the element to use inside the generated code.
documentation: Vec<String>
Documentation of the element extracted from xs:documentation
nodes.
Implementations§
Source§impl ElementMeta
impl ElementMeta
Sourcepub fn new(
ident: Ident,
type_: Ident,
mode: ElementMode,
form: FormChoiceType,
) -> Self
pub fn new( ident: Ident, type_: Ident, mode: ElementMode, form: FormChoiceType, ) -> Self
Create a new ElementMeta
instance from the passed name
, type_
and element_mode
.
Sourcepub fn any(ident: Ident, meta: AnyMeta) -> Self
pub fn any(ident: Ident, meta: AnyMeta) -> Self
Create a new ElementMeta
instance for an xs:any
element.
Sourcepub fn text(ident: Ident) -> Self
pub fn text(ident: Ident) -> Self
Create a new ElementMeta
instance for a text.
Trait Implementations§
Source§impl Clone for ElementMeta
impl Clone for ElementMeta
Source§fn clone(&self) -> ElementMeta
fn clone(&self) -> ElementMeta
Returns a duplicate of the value. Read more
1.0.0 · 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 ElementMeta
impl Debug for ElementMeta
Source§impl TypeEq for ElementMeta
impl TypeEq for ElementMeta
Source§fn type_hash<H: Hasher>(&self, hasher: &mut H, types: &MetaTypes)
fn type_hash<H: Hasher>(&self, hasher: &mut H, types: &MetaTypes)
Feeds this value into the given
Hasher
.Source§fn type_eq(&self, other: &Self, types: &MetaTypes) -> bool
fn type_eq(&self, other: &Self, types: &MetaTypes) -> bool
Check if this instance is equal to the
other
instance using the passed
types
to resolve identifiers.Source§fn type_hash_slice<H: Hasher>(slice: &[Self], hasher: &mut H, types: &MetaTypes)
fn type_hash_slice<H: Hasher>(slice: &[Self], hasher: &mut H, types: &MetaTypes)
Feeds a slice of this value into the given
Hasher
.Source§fn type_eq_iter<'a, X, Y>(x: X, y: Y, types: &MetaTypes) -> boolwhere
Self: 'a,
X: IntoIterator<Item = &'a Self>,
Y: IntoIterator<Item = &'a Self>,
fn type_eq_iter<'a, X, Y>(x: X, y: Y, types: &MetaTypes) -> boolwhere
Self: 'a,
X: IntoIterator<Item = &'a Self>,
Y: IntoIterator<Item = &'a Self>,
Check if the two passed iterators contain type equal elements.
Auto Trait Implementations§
impl Freeze for ElementMeta
impl RefUnwindSafe for ElementMeta
impl Send for ElementMeta
impl Sync for ElementMeta
impl Unpin for ElementMeta
impl UnwindSafe for ElementMeta
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