pub enum ItemType {
Show 13 variants
AnyItem,
AnyNode,
Document(Option<Box<ItemType>>),
Element(Option<NameTest>, Option<SimpleTypeKey>),
Attribute(Option<NameTest>, Option<SimpleTypeKey>),
SchemaElement(QualifiedName),
SchemaAttribute(QualifiedName),
Text,
Comment,
ProcessingInstruction(Option<String>),
NamespaceNode,
AtomicType(XmlTypeCode),
SchemaAtomicType(SimpleTypeKey),
}Expand description
Item type in a sequence type
Variants§
AnyItem
item() - any item
AnyNode
node() - any node
Document(Option<Box<ItemType>>)
document-node() with optional element type
Element(Option<NameTest>, Option<SimpleTypeKey>)
element() with optional name and type
Attribute(Option<NameTest>, Option<SimpleTypeKey>)
attribute() with optional name and type
SchemaElement(QualifiedName)
schema-element()
SchemaAttribute(QualifiedName)
schema-attribute()
Text
text()
Comment
comment()
ProcessingInstruction(Option<String>)
processing-instruction()
NamespaceNode
namespace-node()
AtomicType(XmlTypeCode)
Atomic type (xs:string, xs:integer, etc.)
SchemaAtomicType(SimpleTypeKey)
Schema-defined atomic type
Implementations§
Source§impl ItemType
impl ItemType
Sourcepub fn type_code(&self) -> XmlTypeCode
pub fn type_code(&self) -> XmlTypeCode
Get the type code for this item type
Sourcepub fn matches_item<N: DomNavigator>(
&self,
item: &XmlItem<N>,
ctx: &XPathContext<'_>,
) -> bool
pub fn matches_item<N: DomNavigator>( &self, item: &XmlItem<N>, ctx: &XPathContext<'_>, ) -> bool
Check if a single XmlItem matches this item type.
This is the runtime type matching method for function signatures and general type checking.
Trait Implementations§
impl Eq for ItemType
impl StructuralPartialEq for ItemType
Auto Trait Implementations§
impl Freeze for ItemType
impl RefUnwindSafe for ItemType
impl Send for ItemType
impl Sync for ItemType
impl Unpin for ItemType
impl UnsafeUnpin for ItemType
impl UnwindSafe for ItemType
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