pub enum BuiltInType {
Show 51 variants
AnySimpleType,
AnyAtomicType,
UntypedAtomic,
String,
Boolean,
Decimal,
Float,
Double,
Duration,
DateTime,
Time,
Date,
GYearMonth,
GYear,
GMonthDay,
GDay,
GMonth,
HexBinary,
Base64Binary,
AnyURI,
QName,
NOTATION,
NormalizedString,
Token,
Language,
NMTOKEN,
NMTOKENS,
Name,
NCName,
ID,
IDREF,
IDREFS,
ENTITY,
ENTITIES,
Integer,
NonPositiveInteger,
NegativeInteger,
Long,
Int,
Short,
Byte,
NonNegativeInteger,
UnsignedLong,
UnsignedInt,
UnsignedShort,
UnsignedByte,
PositiveInteger,
YearMonthDuration,
DayTimeDuration,
DateTimeStamp,
XsError,
}Expand description
Built-in XSD simple types
This enum represents all built-in simple types in XSD 1.0 and 1.1.
Use XmlTypeCode for a more comprehensive type code enumeration
that includes node types and complex types.
Variants§
AnySimpleType
xs:anySimpleType - base of all simple types
AnyAtomicType
xs:anyAtomicType - base of all atomic types (XSD 1.1)
UntypedAtomic
xs:untypedAtomic - untyped atomic value (XSD 1.1)
String
xs:string
Boolean
xs:boolean
Decimal
xs:decimal
Float
xs:float
Double
xs:double
Duration
xs:duration
DateTime
xs:dateTime
Time
xs:time
Date
xs:date
GYearMonth
xs:gYearMonth
GYear
xs:gYear
GMonthDay
xs:gMonthDay
GDay
xs:gDay
GMonth
xs:gMonth
HexBinary
xs:hexBinary
Base64Binary
xs:base64Binary
AnyURI
xs:anyURI
QName
xs:QName
NOTATION
xs:NOTATION
NormalizedString
xs:normalizedString
Token
xs:token
Language
xs:language
NMTOKEN
xs:NMTOKEN
NMTOKENS
xs:NMTOKENS (list type)
Name
xs:Name
NCName
xs:NCName
ID
xs:ID
IDREF
xs:IDREF
IDREFS
xs:IDREFS (list type)
ENTITY
xs:ENTITY
ENTITIES
xs:ENTITIES (list type)
Integer
xs:integer
NonPositiveInteger
xs:nonPositiveInteger
NegativeInteger
xs:negativeInteger
Long
xs:long
Int
xs:int
Short
xs:short
Byte
xs:byte
NonNegativeInteger
xs:nonNegativeInteger
UnsignedLong
xs:unsignedLong
UnsignedInt
xs:unsignedInt
UnsignedShort
xs:unsignedShort
UnsignedByte
xs:unsignedByte
PositiveInteger
xs:positiveInteger
YearMonthDuration
xs:yearMonthDuration (XSD 1.1)
DayTimeDuration
xs:dayTimeDuration (XSD 1.1)
DateTimeStamp
xs:dateTimeStamp (XSD 1.1)
XsError
xs:error - the bottom type (union of no members); has no valid values (XSD 1.1)
Implementations§
Source§impl BuiltInType
impl BuiltInType
Sourcepub fn local_name(&self) -> &'static str
pub fn local_name(&self) -> &'static str
Get the local name of this built-in type.
Delegates to XmlTypeCode::local_name for consistency.
Sourcepub fn type_code(&self) -> XmlTypeCode
pub fn type_code(&self) -> XmlTypeCode
Get the corresponding XmlTypeCode for this built-in type.
Sourcepub fn primitive_type_code(&self) -> Option<PrimitiveTypeCode>
pub fn primitive_type_code(&self) -> Option<PrimitiveTypeCode>
Get the primitive type code for this built-in type.
Returns None for abstract types (AnySimpleType, AnyAtomicType)
and list types (NMTOKENS, IDREFS, ENTITIES).
Sourcepub fn is_primitive(&self) -> bool
pub fn is_primitive(&self) -> bool
Check if this is a primitive type (one of the 19 fundamental types).
Sourcepub fn from_local_name(name: &str) -> Option<BuiltInType>
pub fn from_local_name(name: &str) -> Option<BuiltInType>
Parse a built-in type from its local name.
Delegates to XmlTypeCode::from_local_name for consistency.
Sourcepub fn all() -> impl Iterator<Item = BuiltInType>
pub fn all() -> impl Iterator<Item = BuiltInType>
Returns an iterator over all built-in types.
Trait Implementations§
Source§impl Clone for BuiltInType
impl Clone for BuiltInType
Source§fn clone(&self) -> BuiltInType
fn clone(&self) -> BuiltInType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BuiltInType
Source§impl Debug for BuiltInType
impl Debug for BuiltInType
impl Eq for BuiltInType
Source§impl From<BuiltInType> for XmlTypeCode
impl From<BuiltInType> for XmlTypeCode
Source§fn from(builtin: BuiltInType) -> Self
fn from(builtin: BuiltInType) -> Self
Source§impl Hash for BuiltInType
impl Hash for BuiltInType
Source§impl PartialEq for BuiltInType
impl PartialEq for BuiltInType
Source§fn eq(&self, other: &BuiltInType) -> bool
fn eq(&self, other: &BuiltInType) -> bool
self and other values to be equal, and is used by ==.