pub struct BuiltinTypes {Show 57 fields
pub any_type: ComplexTypeKey,
pub any_simple_type: SimpleTypeKey,
pub any_atomic_type: Option<SimpleTypeKey>,
pub string: SimpleTypeKey,
pub normalized_string: SimpleTypeKey,
pub token: SimpleTypeKey,
pub language: SimpleTypeKey,
pub nmtoken: SimpleTypeKey,
pub name: SimpleTypeKey,
pub ncname: SimpleTypeKey,
pub id: SimpleTypeKey,
pub idref: SimpleTypeKey,
pub entity: SimpleTypeKey,
pub boolean: SimpleTypeKey,
pub decimal: SimpleTypeKey,
pub float: SimpleTypeKey,
pub double: SimpleTypeKey,
pub integer: SimpleTypeKey,
pub non_positive_integer: SimpleTypeKey,
pub negative_integer: SimpleTypeKey,
pub long: SimpleTypeKey,
pub int: SimpleTypeKey,
pub short: SimpleTypeKey,
pub byte: SimpleTypeKey,
pub non_negative_integer: SimpleTypeKey,
pub unsigned_long: SimpleTypeKey,
pub unsigned_int: SimpleTypeKey,
pub unsigned_short: SimpleTypeKey,
pub unsigned_byte: SimpleTypeKey,
pub positive_integer: SimpleTypeKey,
pub duration: SimpleTypeKey,
pub datetime: SimpleTypeKey,
pub time: SimpleTypeKey,
pub date: SimpleTypeKey,
pub g_year_month: SimpleTypeKey,
pub g_year: SimpleTypeKey,
pub g_month_day: SimpleTypeKey,
pub g_day: SimpleTypeKey,
pub g_month: SimpleTypeKey,
pub year_month_duration: Option<SimpleTypeKey>,
pub day_time_duration: Option<SimpleTypeKey>,
pub datetime_stamp: Option<SimpleTypeKey>,
pub untyped_atomic: Option<SimpleTypeKey>,
pub error: Option<SimpleTypeKey>,
pub hex_binary: SimpleTypeKey,
pub base64_binary: SimpleTypeKey,
pub any_uri: SimpleTypeKey,
pub xsi_schema_location_type: SimpleTypeKey,
pub qname: SimpleTypeKey,
pub notation: SimpleTypeKey,
pub nmtokens: SimpleTypeKey,
pub idrefs: SimpleTypeKey,
pub entities: SimpleTypeKey,
pub xsi_type_attr: AttributeKey,
pub xsi_nil_attr: AttributeKey,
pub xsi_schema_location_attr: AttributeKey,
pub xsi_no_namespace_schema_location_attr: AttributeKey,
/* private fields */
}Expand description
Well-known built-in type IDs for fast access.
This struct contains SimpleTypeKey references for all 50 built-in XSD
simple types. It is initialized when a SchemaSet is created.
Types are organized by category:
- Abstract types (anySimpleType, anyAtomicType)
- String types (string, normalizedString, token, etc.)
- Numeric types (boolean, decimal, float, double, integer hierarchy)
- Date/time types (duration, dateTime, date, time, gregorian types)
- Binary types (hexBinary, base64Binary)
- Other types (anyURI, QName, NOTATION)
- List types (NMTOKENS, IDREFS, ENTITIES)
Fields§
§any_type: ComplexTypeKeyxs:anyType - the ur-type
any_simple_type: SimpleTypeKeyxs:anySimpleType - base of all simple types
any_atomic_type: Option<SimpleTypeKey>xs:anyAtomicType - base of all atomic types (XSD 1.1)
string: SimpleTypeKeyxs:string
normalized_string: SimpleTypeKeyxs:normalizedString
token: SimpleTypeKeyxs:token
language: SimpleTypeKeyxs:language
nmtoken: SimpleTypeKeyxs:NMTOKEN
name: SimpleTypeKeyxs:Name
ncname: SimpleTypeKeyxs:NCName
id: SimpleTypeKeyxs:ID
idref: SimpleTypeKeyxs:IDREF
entity: SimpleTypeKeyxs:ENTITY
boolean: SimpleTypeKeyxs:boolean
decimal: SimpleTypeKeyxs:decimal
float: SimpleTypeKeyxs:float
double: SimpleTypeKeyxs:double
integer: SimpleTypeKeyxs:integer
non_positive_integer: SimpleTypeKeyxs:nonPositiveInteger
negative_integer: SimpleTypeKeyxs:negativeInteger
long: SimpleTypeKeyxs:long
int: SimpleTypeKeyxs:int
short: SimpleTypeKeyxs:short
byte: SimpleTypeKeyxs:byte
non_negative_integer: SimpleTypeKeyxs:nonNegativeInteger
unsigned_long: SimpleTypeKeyxs:unsignedLong
unsigned_int: SimpleTypeKeyxs:unsignedInt
unsigned_short: SimpleTypeKeyxs:unsignedShort
unsigned_byte: SimpleTypeKeyxs:unsignedByte
positive_integer: SimpleTypeKeyxs:positiveInteger
duration: SimpleTypeKeyxs:duration
datetime: SimpleTypeKeyxs:dateTime
time: SimpleTypeKeyxs:time
date: SimpleTypeKeyxs:date
g_year_month: SimpleTypeKeyxs:gYearMonth
g_year: SimpleTypeKeyxs:gYear
g_month_day: SimpleTypeKeyxs:gMonthDay
g_day: SimpleTypeKeyxs:gDay
g_month: SimpleTypeKeyxs:gMonth
year_month_duration: Option<SimpleTypeKey>xs:yearMonthDuration (XSD 1.1)
day_time_duration: Option<SimpleTypeKey>xs:dayTimeDuration (XSD 1.1)
datetime_stamp: Option<SimpleTypeKey>xs:dateTimeStamp (XSD 1.1)
untyped_atomic: Option<SimpleTypeKey>xs:untypedAtomic (XSD 1.1)
error: Option<SimpleTypeKey>xs:error - the bottom type (union of no members); has no valid values (XSD 1.1)
hex_binary: SimpleTypeKeyxs:hexBinary
base64_binary: SimpleTypeKeyxs:base64Binary
any_uri: SimpleTypeKeyxs:anyURI
xsi_schema_location_type: SimpleTypeKeyAnonymous list(xs:anyURI) — type of xsi:schemaLocation built-in attribute
qname: SimpleTypeKeyxs:QName
notation: SimpleTypeKeyxs:NOTATION
nmtokens: SimpleTypeKeyxs:NMTOKENS
idrefs: SimpleTypeKeyxs:IDREFS
entities: SimpleTypeKeyxs:ENTITIES
xsi_type_attr: AttributeKeyxsi:type built-in attribute declaration
xsi_nil_attr: AttributeKeyxsi:nil built-in attribute declaration
xsi_schema_location_attr: AttributeKeyxsi:schemaLocation built-in attribute declaration
xsi_no_namespace_schema_location_attr: AttributeKeyxsi:noNamespaceSchemaLocation built-in attribute declaration
Implementations§
Source§impl BuiltinTypes
impl BuiltinTypes
Sourcepub fn new(schema_set: &mut SchemaSet) -> Self
pub fn new(schema_set: &mut SchemaSet) -> Self
Initialize all built-in types and register them in the schema set.
This creates SimpleTypeDefData entries in the arenas for all
47 XSD 1.0 built-in types (plus 3 additional XSD 1.1 types if
the version is XSD 1.1).
Sourcepub fn get_by_type_code(&self, code: XmlTypeCode) -> Option<SimpleTypeKey>
pub fn get_by_type_code(&self, code: XmlTypeCode) -> Option<SimpleTypeKey>
Get a built-in type by its XmlTypeCode.
Returns None for node types, AnyType, and other non-simple type codes.
Sourcepub fn get_by_local_name(&self, name: NameId) -> Option<SimpleTypeKey>
pub fn get_by_local_name(&self, name: NameId) -> Option<SimpleTypeKey>
Get a built-in type by its local name (within the XS namespace).
The local name must be interned in the NameTable (passed as NameId).
Sourcepub fn get_type_code(&self, key: SimpleTypeKey) -> Option<XmlTypeCode>
pub fn get_type_code(&self, key: SimpleTypeKey) -> Option<XmlTypeCode>
Get the XmlTypeCode for a built-in type key.
Returns None if the key is not a built-in type.
Sourcepub fn is_builtin(&self, key: SimpleTypeKey) -> bool
pub fn is_builtin(&self, key: SimpleTypeKey) -> bool
Check if a type key is a built-in type.
Sourcepub fn is_any_atomic_type(&self, key: SimpleTypeKey) -> bool
pub fn is_any_atomic_type(&self, key: SimpleTypeKey) -> bool
True when key is the xs:anyAtomicType built-in (XSD 1.1 only).
Sourcepub fn get_base_type(&self, key: SimpleTypeKey) -> Option<SimpleTypeKey>
pub fn get_base_type(&self, key: SimpleTypeKey) -> Option<SimpleTypeKey>
Get the base type for a built-in type (for derivation hierarchy).
Returns the immediate base type in the XSD type hierarchy.
Returns None for anySimpleType (the root of simple types).
In XSD 1.1 mode, primitive atomic types derive from xs:anyAtomicType
per §3.16.7.3; in XSD 1.0 they derive from xs:anySimpleType.
Sourcepub fn derives_from(&self, derived: SimpleTypeKey, base: SimpleTypeKey) -> bool
pub fn derives_from(&self, derived: SimpleTypeKey, base: SimpleTypeKey) -> bool
Check if derived derives from base (transitively).
Returns true if:
derived == base, orderivedhasbasesomewhere in its derivation chain
Trait Implementations§
Source§impl Clone for BuiltinTypes
impl Clone for BuiltinTypes
Source§fn clone(&self) -> BuiltinTypes
fn clone(&self) -> BuiltinTypes
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more