#[repr(u8)]pub enum XmlTypeCode {
Show 62 variants
None = 0,
Item = 1,
Node = 2,
Document = 3,
Element = 4,
Attribute = 5,
Namespace = 6,
ProcessingInstruction = 7,
Comment = 8,
Text = 9,
AnyType = 10,
AnySimpleType = 11,
AnyAtomicType = 12,
UntypedAtomic = 13,
String = 14,
NormalizedString = 15,
Token = 16,
Language = 17,
NmToken = 18,
Name = 19,
NCName = 20,
Id = 21,
IdRef = 22,
Entity = 23,
Boolean = 24,
Decimal = 25,
Float = 26,
Double = 27,
Integer = 28,
NonPositiveInteger = 29,
NegativeInteger = 30,
Long = 31,
Int = 32,
Short = 33,
Byte = 34,
NonNegativeInteger = 35,
UnsignedLong = 36,
UnsignedInt = 37,
UnsignedShort = 38,
UnsignedByte = 39,
PositiveInteger = 40,
Duration = 41,
DateTime = 42,
Time = 43,
Date = 44,
GYearMonth = 45,
GYear = 46,
GMonthDay = 47,
GDay = 48,
GMonth = 49,
YearMonthDuration = 50,
DayTimeDuration = 51,
DateTimeStamp = 52,
HexBinary = 53,
Base64Binary = 54,
AnyUri = 55,
QName = 56,
Notation = 57,
NmTokens = 58,
IdRefs = 59,
Entities = 60,
Error = 61,
}Expand description
XSD type codes for type identification and dispatch.
Ordered to match .NET XmlTypeCode for interoperability.
See XSD_TYPE_DESIGN.md §3.2 for full specification.
Variants§
None = 0
No type information
Item = 1
Any item (XPath2)
Node = 2
Any node
Document = 3
Document node
Element = 4
Element node
Attribute = 5
Attribute node
Namespace = 6
Namespace node
ProcessingInstruction = 7
Processing instruction node
Comment = 8
Comment node
Text = 9
Text node
AnyType = 10
xs:anyType - the ur-type
AnySimpleType = 11
xs:anySimpleType - base of all simple types
AnyAtomicType = 12
xs:anyAtomicType - base of all atomic types (XSD 1.1)
UntypedAtomic = 13
xs:untypedAtomic - untyped atomic value
String = 14
xs:string
NormalizedString = 15
xs:normalizedString
Token = 16
xs:token
Language = 17
xs:language
NmToken = 18
xs:NMTOKEN
Name = 19
xs:Name
NCName = 20
xs:NCName
Id = 21
xs:ID
IdRef = 22
xs:IDREF
Entity = 23
xs:ENTITY
Boolean = 24
xs:boolean
Decimal = 25
xs:decimal
Float = 26
xs:float
Double = 27
xs:double
Integer = 28
xs:integer
NonPositiveInteger = 29
xs:nonPositiveInteger
NegativeInteger = 30
xs:negativeInteger
Long = 31
xs:long
Int = 32
xs:int
Short = 33
xs:short
Byte = 34
xs:byte
NonNegativeInteger = 35
xs:nonNegativeInteger
UnsignedLong = 36
xs:unsignedLong
UnsignedInt = 37
xs:unsignedInt
UnsignedShort = 38
xs:unsignedShort
UnsignedByte = 39
xs:unsignedByte
PositiveInteger = 40
xs:positiveInteger
Duration = 41
xs:duration
DateTime = 42
xs:dateTime
Time = 43
xs:time
Date = 44
xs:date
GYearMonth = 45
xs:gYearMonth
GYear = 46
xs:gYear
GMonthDay = 47
xs:gMonthDay
GDay = 48
xs:gDay
GMonth = 49
xs:gMonth
YearMonthDuration = 50
xs:yearMonthDuration (XSD 1.1)
DayTimeDuration = 51
xs:dayTimeDuration (XSD 1.1)
DateTimeStamp = 52
xs:dateTimeStamp (XSD 1.1)
HexBinary = 53
xs:hexBinary
Base64Binary = 54
xs:base64Binary
AnyUri = 55
xs:anyURI
QName = 56
xs:QName
Notation = 57
xs:NOTATION
NmTokens = 58
xs:NMTOKENS (list of NMTOKEN)
IdRefs = 59
xs:IDREFS (list of IDREF)
Entities = 60
xs:ENTITIES (list of ENTITY)
Error = 61
xs:error - the bottom type (union of no members); has no valid values (XSD 1.1)
Implementations§
Source§impl XmlTypeCode
impl XmlTypeCode
Sourcepub fn is_atomic(&self) -> bool
pub fn is_atomic(&self) -> bool
Returns true if this is an atomic type (not node, not list, not ur-type).
Sourcepub fn is_list(&self) -> bool
pub fn is_list(&self) -> bool
Returns true if this is a list type (NMTOKENS, IDREFS, ENTITIES).
Sourcepub fn is_primitive_atomic(&self) -> bool
pub fn is_primitive_atomic(&self) -> bool
Returns true if this is one of the 19 XSD primitive atomic types
that derive from xs:anyAtomicType in XSD 1.1 (§3.16.7.3).
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Returns true if this is a numeric type.
Sourcepub fn is_date_time(&self) -> bool
pub fn is_date_time(&self) -> bool
Returns true if this is a date/time type.
Sourcepub fn is_string_derived(&self) -> bool
pub fn is_string_derived(&self) -> bool
Returns true if this is a string-derived type.
Sourcepub fn list_item_type(&self) -> Option<XmlTypeCode>
pub fn list_item_type(&self) -> Option<XmlTypeCode>
Returns the item type for list types, or None for non-list types.
Sourcepub fn local_name(&self) -> Option<&'static str>
pub fn local_name(&self) -> Option<&'static str>
Get the local name of this type code (XSD type name).
Sourcepub fn from_local_name(name: &str) -> Option<XmlTypeCode>
pub fn from_local_name(name: &str) -> Option<XmlTypeCode>
Parse type code from XSD local name.
Trait Implementations§
Source§impl Clone for XmlTypeCode
impl Clone for XmlTypeCode
Source§fn clone(&self) -> XmlTypeCode
fn clone(&self) -> XmlTypeCode
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 XmlTypeCode
Source§impl Debug for XmlTypeCode
impl Debug for XmlTypeCode
Source§impl Default for XmlTypeCode
impl Default for XmlTypeCode
Source§fn default() -> XmlTypeCode
fn default() -> XmlTypeCode
impl Eq for XmlTypeCode
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 XmlTypeCode
impl Hash for XmlTypeCode
Source§impl PartialEq for XmlTypeCode
impl PartialEq for XmlTypeCode
Source§fn eq(&self, other: &XmlTypeCode) -> bool
fn eq(&self, other: &XmlTypeCode) -> bool
self and other values to be equal, and is used by ==.