pub enum DocumentError {
Show 13 variants
Utf8 {
source: Utf8Error,
},
Text(TextError),
Value {
path: KeyPath,
source: ValueError,
},
Annotation {
path: KeyPath,
source: AnnotationError,
},
Columns(ColumnsError),
Ownership(OwnershipError),
LineEnding(LineEndingError),
Merge(MergeError),
Json(JsonError),
Markdown(MarkdownError),
Toml(TomlError),
Yaml(YamlError),
Internal(InternalError),
}Expand description
Error returned by document validation, rendering, and reconciliation.
Variants§
Utf8
A document’s bytes are not valid UTF-8.
Text(TextError)
A plain text document’s comment nodes could not be rendered.
Value
A generic structured value could not be shaped for its format.
Fields
source: ValueErrorWhat is wrong with the value.
Annotation
An inline annotation marker is malformed.
Fields
source: AnnotationErrorWhat is wrong with the marker.
Columns(ColumnsError)
A column count is invalid.
Ownership(OwnershipError)
An ownership declaration is invalid.
LineEnding(LineEndingError)
A document’s line endings are inconsistent.
Merge(MergeError)
A desired document cannot be merged into the current one.
Json(JsonError)
A JSON or JSON5 document is malformed.
Markdown(MarkdownError)
A Markdown document or selector is malformed.
Toml(TomlError)
A TOML document or selector is malformed.
Yaml(YamlError)
A YAML document is malformed.
Internal(InternalError)
A bug in this crate, not a problem with the input.
Implementations§
Source§impl DocumentError
impl DocumentError
pub(crate) const fn value(source: ValueError) -> Self
Sourcepub(crate) fn not_string(path: &[String]) -> Self
pub(crate) fn not_string(path: &[String]) -> Self
The value at path is not a string.
pub(crate) fn yaml_parse(source: YamlError) -> Self
pub(crate) const fn annotation(source: AnnotationError) -> Self
Trait Implementations§
Source§impl Debug for DocumentError
impl Debug for DocumentError
Source§impl Display for DocumentError
impl Display for DocumentError
Source§impl Error for DocumentError
impl Error for DocumentError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()