pub enum DocError {
UnknownNodeType(String),
UnknownMarkType(String),
InvalidContent {
parent: String,
},
PositionOutOfRange {
pos: usize,
max: usize,
},
MalformedJson(String),
HtmlParse(String),
}Expand description
Error raised while constructing or deserializing a document.
Variants§
UnknownNodeType(String)
A referenced node type name is not in the schema.
UnknownMarkType(String)
A referenced mark type name is not in the schema.
InvalidContent
Children did not satisfy the parent node type’s content expression.
PositionOutOfRange
A position was out of range for the document it was resolved against.
MalformedJson(String)
JSON did not match the expected document shape.
HtmlParse(String)
HTML input was malformed or exceeded a safety limit (e.g. nesting depth).
Trait Implementations§
impl Eq for DocError
Source§impl Error for DocError
impl Error for DocError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for DocError
Auto Trait Implementations§
impl Freeze for DocError
impl RefUnwindSafe for DocError
impl Send for DocError
impl Sync for DocError
impl Unpin for DocError
impl UnsafeUnpin for DocError
impl UnwindSafe for DocError
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