pub enum NfaTerm {
Element {
name: NameId,
namespace: Option<NameId>,
element_key: Option<ElementKey>,
resolved_type: Option<TypeKey>,
},
Wildcard {
namespace_constraint: NamespaceConstraint,
process_contents: ProcessContents,
not_qnames: Vec<(Option<NameId>, NameId)>,
},
}Expand description
A term that can be matched in the NFA
Terms represent the actual content that must be matched during validation. Each term corresponds to either a specific element or a wildcard pattern.
Variants§
Element
Match a specific element
Fields
§
element_key: Option<ElementKey>Resolved element key (for type lookup during validation)
Wildcard
Match any element satisfying wildcard constraints
Fields
§
namespace_constraint: NamespaceConstraintNamespace constraint for allowed namespaces
§
process_contents: ProcessContentsHow to process matched content
Implementations§
Source§impl NfaTerm
impl NfaTerm
Sourcepub fn element(
name: NameId,
namespace: Option<NameId>,
element_key: Option<ElementKey>,
) -> Self
pub fn element( name: NameId, namespace: Option<NameId>, element_key: Option<ElementKey>, ) -> Self
Create an element term
Sourcepub fn element_with_type(
name: NameId,
namespace: Option<NameId>,
element_key: Option<ElementKey>,
resolved_type: Option<TypeKey>,
) -> Self
pub fn element_with_type( name: NameId, namespace: Option<NameId>, element_key: Option<ElementKey>, resolved_type: Option<TypeKey>, ) -> Self
Create an element term with a resolved type
Sourcepub fn wildcard(
namespace_constraint: NamespaceConstraint,
process_contents: ProcessContents,
) -> Self
pub fn wildcard( namespace_constraint: NamespaceConstraint, process_contents: ProcessContents, ) -> Self
Create a wildcard term
Sourcepub fn wildcard_with_not_qnames(
namespace_constraint: NamespaceConstraint,
process_contents: ProcessContents,
not_qnames: Vec<(Option<NameId>, NameId)>,
) -> Self
pub fn wildcard_with_not_qnames( namespace_constraint: NamespaceConstraint, process_contents: ProcessContents, not_qnames: Vec<(Option<NameId>, NameId)>, ) -> Self
Create a wildcard term with QName exclusions (XSD 1.1)
Sourcepub fn is_element(&self) -> bool
pub fn is_element(&self) -> bool
Check if this term is an element
Sourcepub fn is_wildcard(&self) -> bool
pub fn is_wildcard(&self) -> bool
Check if this term is a wildcard
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NfaTerm
impl RefUnwindSafe for NfaTerm
impl Send for NfaTerm
impl Sync for NfaTerm
impl Unpin for NfaTerm
impl UnsafeUnpin for NfaTerm
impl UnwindSafe for NfaTerm
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