pub struct RelaxNgPattern {
pub pattern_type: RelaxNgPatternType,
pub name_class: Option<RelaxNgNameClass>,
pub children: Vec<RelaxNgPattern>,
pub name: Option<String>,
pub ns: Option<String>,
pub datatype: Option<String>,
pub value: Option<String>,
pub datatype_library: Option<String>,
}Expand description
A RELAX NG pattern — the core building block of RELAX NG schemas.
Patterns form a tree structure where composite patterns contain child patterns.
Fields§
§pattern_type: RelaxNgPatternTypeThe type of this pattern.
name_class: Option<RelaxNgNameClass>Name class (for element/attribute patterns).
children: Vec<RelaxNgPattern>Child patterns.
name: Option<String>The name for <ref> and <define> patterns.
ns: Option<String>The namespace URI for nsName or element/attribute.
datatype: Option<String>Datatype for <data> patterns.
value: Option<String>Value for <value> patterns.
datatype_library: Option<String>Datatype library (e.g., “” for built-in).
Implementations§
Source§impl RelaxNgPattern
impl RelaxNgPattern
Sourcepub fn new(pattern_type: RelaxNgPatternType) -> Self
pub fn new(pattern_type: RelaxNgPatternType) -> Self
Create a new pattern with the given type.
Sourcepub fn not_allowed() -> Self
pub fn not_allowed() -> Self
Create a notAllowed pattern.
Trait Implementations§
Source§impl Clone for RelaxNgPattern
impl Clone for RelaxNgPattern
Source§fn clone(&self) -> RelaxNgPattern
fn clone(&self) -> RelaxNgPattern
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 RelaxNgPattern
impl RefUnwindSafe for RelaxNgPattern
impl Send for RelaxNgPattern
impl Sync for RelaxNgPattern
impl Unpin for RelaxNgPattern
impl UnsafeUnpin for RelaxNgPattern
impl UnwindSafe for RelaxNgPattern
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