pub struct AllParticle {
pub term: NfaTerm,
pub min_occurs: u32,
pub max_occurs: MaxOccurs,
pub source: Option<SourceRef>,
}Expand description
A particle within an all-group
Fields§
§term: NfaTermThe term that must be matched
min_occurs: u32Minimum required occurrences
max_occurs: MaxOccursMaximum allowed occurrences
source: Option<SourceRef>Source location for error reporting
Implementations§
Source§impl AllParticle
impl AllParticle
Sourcepub fn new(
term: NfaTerm,
min_occurs: u32,
max_occurs: MaxOccurs,
source: Option<SourceRef>,
) -> Self
pub fn new( term: NfaTerm, min_occurs: u32, max_occurs: MaxOccurs, source: Option<SourceRef>, ) -> Self
Create a new all-particle
Sourcepub fn is_optional(&self) -> bool
pub fn is_optional(&self) -> bool
Check if this particle is optional (minOccurs = 0)
Sourcepub fn is_satisfied(&self, consumed: u32) -> bool
pub fn is_satisfied(&self, consumed: u32) -> bool
Check if the given occurrence count satisfies minOccurs
Trait Implementations§
Source§impl Clone for AllParticle
impl Clone for AllParticle
Source§fn clone(&self) -> AllParticle
fn clone(&self) -> AllParticle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AllParticle
impl RefUnwindSafe for AllParticle
impl Send for AllParticle
impl Sync for AllParticle
impl Unpin for AllParticle
impl UnsafeUnpin for AllParticle
impl UnwindSafe for AllParticle
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