pub struct TypeIdent {
pub ns: NamespaceId,
pub schema: SchemaId,
pub name: Name,
pub type_: TypeIdentType,
}Expand description
Type that is used to identify types in the schema definition.
Fields§
§ns: NamespaceIdNamespace the type is defined in
schema: SchemaIdId of the schema file the type pointed to by this identifier was defined at.
This is needed to support the case when identifier are duplicated across
schema files, or redefined by xs:redefine or xs:override.
name: NameName of the type.
type_: TypeIdentTypeType of the identifier (because pure names are not unique in XSD).
Implementations§
Source§impl TypeIdent
impl TypeIdent
pub const UNKNOWN: Self
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 STR: Self
pub const STRING: Self
pub const ANY_TYPE: Self
pub const BUILD_IN: &[Self]
Source§impl TypeIdent
impl TypeIdent
Sourcepub const fn new(name: Name) -> Self
pub const fn new(name: Name) -> Self
Create a new TypeIdent instance with IdentType::Type and the passed name.
Sourcepub const fn type_(name: &'static str) -> Self
pub const fn type_(name: &'static str) -> Self
Create a new TypeIdent instance with IdentType::Type and the passed name.
Sourcepub const fn build_in(name: &'static str) -> Self
pub const fn build_in(name: &'static str) -> Self
Create a new TypeIdent instance with IdentType::BuildIn and the passed name.
Sourcepub const fn element(name: &'static str) -> Self
pub const fn element(name: &'static str) -> Self
Create a new TypeIdent instance with IdentType::Element and the passed name.
Sourcepub fn with_ns(self, ns: NamespaceId) -> Self
pub fn with_ns(self, ns: NamespaceId) -> Self
Change the NamespaceId of this type identifier.
Sourcepub fn with_schema(self, schema: SchemaId) -> Self
pub fn with_schema(self, schema: SchemaId) -> Self
Change the SchemaId of this type identifier.
Sourcepub fn with_type(self, type_: TypeIdentType) -> Self
pub fn with_type(self, type_: TypeIdentType) -> Self
Change the TypeIdentType of this type identifier.
Sourcepub fn to_property_ident(&self) -> PropertyIdent
pub fn to_property_ident(&self) -> PropertyIdent
Convert this type identifier into a PropertyIdent by dropping the schema
and type information.
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.
Sourcepub fn is_fully_qualified(&self) -> bool
pub fn is_fully_qualified(&self) -> bool
Trait Implementations§
Source§impl Ord for TypeIdent
impl Ord for TypeIdent
Source§impl PartialOrd for TypeIdent
impl PartialOrd for TypeIdent
Source§impl TypeEq for TypeIdent
impl TypeEq for TypeIdent
Source§fn type_hash<H: Hasher>(&self, hasher: &mut H, types: &MetaTypes)
fn type_hash<H: Hasher>(&self, hasher: &mut H, types: &MetaTypes)
Hasher.Source§fn type_eq(&self, other: &Self, types: &MetaTypes) -> bool
fn type_eq(&self, other: &Self, types: &MetaTypes) -> bool
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)
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>,
impl Eq for TypeIdent
impl StructuralPartialEq for TypeIdent
Auto Trait Implementations§
impl Freeze for TypeIdent
impl RefUnwindSafe for TypeIdent
impl Send for TypeIdent
impl Sync for TypeIdent
impl Unpin for TypeIdent
impl UnsafeUnpin for TypeIdent
impl UnwindSafe for TypeIdent
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
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
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<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.