pub struct ElementConstraint {Show 15 fields
pub min_occurs: Option<u32>,
pub max_occurs: Option<u32>,
pub min_children: Option<u32>,
pub max_children: Option<u32>,
pub min_content: Option<u32>,
pub min_length: Option<u32>,
pub required_attributes: Vec<String>,
pub required_children: Vec<String>,
pub required_child_types: Vec<String>,
pub preserve_whitespace: bool,
pub no_nesting: bool,
pub allow_nesting: bool,
pub reserved: bool,
pub warning: Option<String>,
pub size: Option<SizeConstraint>,
}Expand description
Element-specific constraint
Fields§
§min_occurs: Option<u32>Minimum occurrences
max_occurs: Option<u32>Maximum occurrences
min_children: Option<u32>Minimum number of children
max_children: Option<u32>Maximum number of children
min_content: Option<u32>Minimum content length
min_length: Option<u32>Minimum text length
required_attributes: Vec<String>Required attributes
required_children: Vec<String>Required children
required_child_types: Vec<String>Required child types
preserve_whitespace: boolPreserve whitespace
no_nesting: boolDisallow nesting
allow_nesting: boolAllow self-nesting
reserved: boolReserved for future use
warning: Option<String>Warning message
size: Option<SizeConstraint>Size constraints
Trait Implementations§
Source§impl Clone for ElementConstraint
impl Clone for ElementConstraint
Source§fn clone(&self) -> ElementConstraint
fn clone(&self) -> ElementConstraint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElementConstraint
impl Debug for ElementConstraint
Source§impl Default for ElementConstraint
impl Default for ElementConstraint
Source§fn default() -> ElementConstraint
fn default() -> ElementConstraint
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ElementConstraint
impl<'de> Deserialize<'de> for ElementConstraint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ElementConstraint
impl RefUnwindSafe for ElementConstraint
impl Send for ElementConstraint
impl Sync for ElementConstraint
impl Unpin for ElementConstraint
impl UnwindSafe for ElementConstraint
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