pub enum MaxOccurs {
Unbounded,
Bounded(u32),
}Expand description
MaxOccurs value representation
Represents the maxOccurs constraint from XSD, which can be either a bounded positive integer or unbounded.
Variants§
Implementations§
Source§impl MaxOccurs
impl MaxOccurs
Sourcepub fn from_option(max: Option<u32>) -> Self
pub fn from_option(max: Option<u32>) -> Self
Create from an Option, where None means unbounded
Sourcepub fn to_option(&self) -> Option<u32>
pub fn to_option(&self) -> Option<u32>
Convert to Option for compatibility with fragment methods
Sourcepub fn is_effectively_unbounded(&self) -> bool
pub fn is_effectively_unbounded(&self) -> bool
Check if this value is effectively unbounded.
Returns true if:
- The value is explicitly Unbounded, or
- The bounded value exceeds MAX_COUNTED_OCCURS
Values up to MAX_COUNTED_OCCURS are handled exactly by counted NFA. Values above fall back to unbounded to bound runtime cost.
Sourcepub fn is_unbounded(&self) -> bool
pub fn is_unbounded(&self) -> bool
Check if this is explicitly unbounded
Trait Implementations§
impl Copy for MaxOccurs
impl Eq for MaxOccurs
impl StructuralPartialEq for MaxOccurs
Auto Trait Implementations§
impl Freeze for MaxOccurs
impl RefUnwindSafe for MaxOccurs
impl Send for MaxOccurs
impl Sync for MaxOccurs
impl Unpin for MaxOccurs
impl UnsafeUnpin for MaxOccurs
impl UnwindSafe for MaxOccurs
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