Skip to main content

Dfa

Struct Dfa 

Source
pub struct Dfa {
    pub states: Vec<DfaState>,
    pub initial: StateId,
    pub defined_siblings: Arc<[QName]>,
}

Fields§

§states: Vec<DfaState>§initial: StateId§defined_siblings: Arc<[QName]>

Names of every element declaration that appears statically in the source content model. Consulted by notQName="##definedSibling" wildcards (XSD 1.1 §3.10.4) to exclude names declared as siblings in the enclosing complex type. Sorted by (namespace, local) so membership checks can binary-search if the list grows; typical schemas keep this short.

Implementations§

Source§

impl Dfa

Source

pub fn step( &self, state: StateId, qn: &QName, wildcard_admits: impl FnMut(&Wildcard, &QName) -> bool, ) -> Option<DfaTransition>

Look up the next state for an incoming element with name qn. Element-name transitions return both the next state and the matched [ElementDecl]; wildcard transitions return the next state and the wildcard’s processContents.

wildcard_admits decides whether a candidate wildcard accepts qn — the caller supplies the wildcard-semantics policy (positive namespace constraint plus the XSD 1.1 notQName / notNamespace exclusions, including ##defined and ##definedSibling lookups). See [wildcard_admits] for the canonical implementation.

Source

pub fn is_accept(&self, state: StateId) -> bool

Trait Implementations§

Source§

impl Debug for Dfa

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Dfa

§

impl RefUnwindSafe for Dfa

§

impl Send for Dfa

§

impl Sync for Dfa

§

impl Unpin for Dfa

§

impl UnsafeUnpin for Dfa

§

impl UnwindSafe for Dfa

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.