pub struct Ident {
pub ns: Option<NamespaceId>,
pub name: Name,
pub type_: IdentType,
}
Expand description
Represents a type identifier.
Fields§
§ns: Option<NamespaceId>
Namespace the type is defined in
name: Name
Name of the type.
type_: IdentType
Type of the identifier (because pure names are not unique in XSD).
Implementations§
Source§impl Ident
impl Ident
pub const U8: Self
pub const U16: Self
pub const U32: Self
pub const U64: Self
pub const U128: Self
pub const USIZE: Self
pub const I8: Self
pub const I16: Self
pub const I32: Self
pub const I64: Self
pub const I128: Self
pub const ISIZE: Self
pub const F32: Self
pub const F64: Self
pub const BOOL: Self
pub const STRING: Self
pub const ANY_TYPE: Self
pub const BUILD_IN: &[Self]
Source§impl Ident
impl Ident
Sourcepub const fn name(name: &'static str) -> Self
pub const fn name(name: &'static str) -> Self
Create an Ident
ifier suitable for field names with the given name
.
Sourcepub fn with_ns(self, ns: Option<NamespaceId>) -> Self
pub fn with_ns(self, ns: Option<NamespaceId>) -> Self
Set the namespace of the identifier.
Sourcepub fn is_build_in(&self) -> bool
pub fn is_build_in(&self) -> bool
Returns true
if this is build-in type of the rust language, false
otherwise.
Trait Implementations§
Source§impl Ord for Ident
impl Ord for Ident
Source§impl PartialOrd for Ident
impl PartialOrd for Ident
Source§impl TypeEq for Ident
impl TypeEq for Ident
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.
impl Eq for Ident
impl StructuralPartialEq for Ident
Auto Trait Implementations§
impl Freeze for Ident
impl RefUnwindSafe for Ident
impl Send for Ident
impl Sync for Ident
impl Unpin for Ident
impl UnwindSafe for Ident
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<X> SerializeBytes for Xwhere
X: ToString,
impl<X> SerializeBytes for Xwhere
X: ToString,
Source§impl<X> SerializeSync for Xwhere
X: WithSerializer,
impl<X> SerializeSync for Xwhere
X: WithSerializer,
Source§impl<X> WithBoxedSerializer for Xwhere
X: WithSerializer,
impl<X> WithBoxedSerializer for Xwhere
X: WithSerializer,
Source§impl<X> WithSerializer for Xwhere
X: SerializeBytes + Debug,
impl<X> WithSerializer for Xwhere
X: SerializeBytes + Debug,
Source§type Serializer<'x> = ContentSerializer<'x, X>
where
X: 'x
type Serializer<'x> = ContentSerializer<'x, X> where X: 'x
The serializer to use for this type.
Source§fn serializer<'ser>(
&'ser self,
name: Option<&'ser str>,
is_root: bool,
) -> Result<<X as WithSerializer>::Serializer<'ser>, Error>
fn serializer<'ser>( &'ser self, name: Option<&'ser str>, is_root: bool, ) -> Result<<X as WithSerializer>::Serializer<'ser>, Error>
Initializes a new serializer from the passed
value
. Read more