pub enum InternalError {
MarkdownSpliceOutOfBounds,
MarkdownTreeInvalid {
parent: &'static str,
child: &'static str,
},
FeatureNotValidated {
feature: Feature,
},
TomlRenderedInvalid {
source: Box<TomlError>,
},
YamlRenderedInvalid {
source: Box<DocumentError>,
},
YamlNodeMissing,
YamlSpanInvalid {
start: usize,
end: usize,
},
}Expand description
A failure that is a bug in this crate, not a problem with the input.
Variants§
MarkdownSpliceOutOfBounds
A byte range computed for splicing fell outside the Markdown source.
MarkdownTreeInvalid
The rendered Markdown tree has a node its parent cannot hold.
Fields
FeatureNotValidated
A value reached a renderer whose format lacks a feature it needs. The validation before rendering should have rejected it.
TomlRenderedInvalid
The renderer produced TOML text that does not parse.
YamlRenderedInvalid
The renderer produced YAML text that does not read back.
Fields
§
source: Box<DocumentError>The error from reading the rendered text.
YamlNodeMissing
The YAML parser did not return a node it reported.
YamlSpanInvalid
The YAML parser reported a span that is not a range of the source.
Implementations§
Source§impl InternalError
impl InternalError
pub(crate) fn markdown_tree(error: &ValidationError<'_>) -> Self
pub(crate) fn toml_rendered(source: TomlError) -> Self
pub(crate) fn yaml_rendered(source: DocumentError) -> Self
Trait Implementations§
Source§impl Debug for InternalError
impl Debug for InternalError
Source§impl Display for InternalError
impl Display for InternalError
Source§impl Error for InternalError
impl Error for InternalError
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()
Source§impl From<InternalError> for DocumentError
impl From<InternalError> for DocumentError
Source§fn from(source: InternalError) -> Self
fn from(source: InternalError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InternalError
impl RefUnwindSafe for InternalError
impl Send for InternalError
impl Sync for InternalError
impl Unpin for InternalError
impl UnsafeUnpin for InternalError
impl UnwindSafe for InternalError
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