pub enum ContentRule {
Types(HashSet<String>),
Expr(ContentExpr),
}Expand description
A node’s allowed content: a set of child types (array form) or an ordered content expression (string form).
Variants§
Types(HashSet<String>)
Allowed child types, any count/order. Emits DisallowedChild.
Expr(ContentExpr)
A content expression (cardinality + ordering). Emits InvalidContent.
Trait Implementations§
Source§impl Clone for ContentRule
impl Clone for ContentRule
Source§fn clone(&self) -> ContentRule
fn clone(&self) -> ContentRule
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 moreSource§impl Debug for ContentRule
impl Debug for ContentRule
Source§impl<'de> Deserialize<'de> for ContentRule
impl<'de> Deserialize<'de> for ContentRule
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ContentRule
impl PartialEq for ContentRule
Source§fn eq(&self, other: &ContentRule) -> bool
fn eq(&self, other: &ContentRule) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ContentRule
impl Serialize for ContentRule
impl StructuralPartialEq for ContentRule
Auto Trait Implementations§
impl Freeze for ContentRule
impl RefUnwindSafe for ContentRule
impl Send for ContentRule
impl Sync for ContentRule
impl Unpin for ContentRule
impl UnsafeUnpin for ContentRule
impl UnwindSafe for ContentRule
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