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§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§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