pub enum ViolationKind {
MissingNodeType,
UnknownNodeType(String),
DisallowedChild {
parent: String,
child: String,
},
InvalidContent {
parent: String,
expr: String,
},
UnknownMark(String),
DisallowedMark {
node: String,
mark: String,
},
MissingAttr {
key: String,
},
UnknownAttr {
key: String,
},
}Expand description
The kinds of schema violation.
Variants§
MissingNodeType
A node had no type.
UnknownNodeType(String)
A node’s type is not in the schema.
DisallowedChild
A child type is not allowed under its parent.
InvalidContent
A node’s children don’t satisfy its content expression.
UnknownMark(String)
A mark type is not in the schema.
DisallowedMark
A mark is registered but not allowed on this node type.
MissingAttr
A required attribute is missing (on a node, or a mark of the node).
UnknownAttr
An attribute key is not in the allowed set.
Trait Implementations§
Source§impl Clone for ViolationKind
impl Clone for ViolationKind
Source§fn clone(&self) -> ViolationKind
fn clone(&self) -> ViolationKind
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 ViolationKind
impl Debug for ViolationKind
Source§impl<'de> Deserialize<'de> for ViolationKind
impl<'de> Deserialize<'de> for ViolationKind
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
Source§impl Display for ViolationKind
impl Display for ViolationKind
Source§impl PartialEq for ViolationKind
impl PartialEq for ViolationKind
Source§fn eq(&self, other: &ViolationKind) -> bool
fn eq(&self, other: &ViolationKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ViolationKind
impl Serialize for ViolationKind
impl Eq for ViolationKind
impl StructuralPartialEq for ViolationKind
Auto Trait Implementations§
impl Freeze for ViolationKind
impl RefUnwindSafe for ViolationKind
impl Send for ViolationKind
impl Sync for ViolationKind
impl Unpin for ViolationKind
impl UnsafeUnpin for ViolationKind
impl UnwindSafe for ViolationKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.