pub struct AllGroupModel {
pub particles: Vec<AllParticle>,
pub open_content: Option<OpenContentWildcard>,
pub outer_optional: bool,
}Expand description
Compiled all-group content model
Represents an xs:all group compiled for validation. All-groups allow
their particles to appear in any order, with each particle subject to
its occurrence constraints.
Fields§
§particles: Vec<AllParticle>Particles in the all-group
open_content: Option<OpenContentWildcard>Open content wildcard (XSD 1.1 only)
outer_optional: boolWhether the outer particle has minOccurs=0, making the entire group optional. When true, the content model is satisfied even if no children are consumed.
Implementations§
Source§impl AllGroupModel
impl AllGroupModel
Sourcepub fn new(particles: Vec<AllParticle>) -> Self
pub fn new(particles: Vec<AllParticle>) -> Self
Create a new all-group model
Sourcepub fn with_open_content(
particles: Vec<AllParticle>,
open_content: OpenContentWildcard,
) -> Self
pub fn with_open_content( particles: Vec<AllParticle>, open_content: OpenContentWildcard, ) -> Self
Create an all-group model with open content
Sourcepub fn particle_count(&self) -> usize
pub fn particle_count(&self) -> usize
Get the number of particles
Sourcepub fn is_optional(&self) -> bool
pub fn is_optional(&self) -> bool
Check if all particles are optional (can match empty sequence)
Sourcepub fn create_state(&self) -> AllGroupState
pub fn create_state(&self) -> AllGroupState
Create a validation state for this model
Trait Implementations§
Source§impl Clone for AllGroupModel
impl Clone for AllGroupModel
Source§fn clone(&self) -> AllGroupModel
fn clone(&self) -> AllGroupModel
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 AllGroupModel
impl RefUnwindSafe for AllGroupModel
impl Send for AllGroupModel
impl Sync for AllGroupModel
impl Unpin for AllGroupModel
impl UnsafeUnpin for AllGroupModel
impl UnwindSafe for AllGroupModel
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