Skip to main content

NfaTerm

Enum NfaTerm 

Source
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

§name: NameId

Element local name (interned)

§namespace: Option<NameId>

Element namespace (None = no namespace)

§element_key: Option<ElementKey>

Resolved element key (for type lookup during validation)

§resolved_type: Option<TypeKey>

Resolved type for local elements (without element key)

§

Wildcard

Match any element satisfying wildcard constraints

Fields

§namespace_constraint: NamespaceConstraint

Namespace constraint for allowed namespaces

§process_contents: ProcessContents

How to process matched content

§not_qnames: Vec<(Option<NameId>, NameId)>

Pre-expanded concrete QName exclusions (XSD 1.1 notQName)

Implementations§

Source§

impl NfaTerm

Source

pub fn element( name: NameId, namespace: Option<NameId>, element_key: Option<ElementKey>, ) -> Self

Create an element term

Source

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

Source

pub fn wildcard( namespace_constraint: NamespaceConstraint, process_contents: ProcessContents, ) -> Self

Create a wildcard term

Source

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)

Source

pub fn is_element(&self) -> bool

Check if this term is an element

Source

pub fn is_wildcard(&self) -> bool

Check if this term is a wildcard

Trait Implementations§

Source§

impl Clone for NfaTerm

Source§

fn clone(&self) -> NfaTerm

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NfaTerm

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.