pub enum SkillError {
MissingFrontmatter {
skill: String,
},
MissingRequiredField {
skill: String,
field: &'static str,
},
InvalidFieldType {
skill: String,
field: &'static str,
reason: String,
},
UnknownCategory {
skill: String,
category: String,
},
InvalidYaml {
skill: String,
source: Error,
},
NotFound {
name: String,
source_name: &'static str,
},
Io {
path: PathBuf,
source: Error,
},
InvalidManifest {
path: PathBuf,
source: Error,
},
SerdeJson {
operation: &'static str,
path: PathBuf,
source: Error,
},
}Expand description
Errors that can surface while loading, parsing, or installing a skill.
Variants§
MissingFrontmatter
The skill body did not open with a YAML frontmatter block
(--- at line 1, closing --- on a subsequent line).
MissingRequiredField
The YAML frontmatter parsed but did not contain a required field.
Fields
InvalidFieldType
The YAML frontmatter parsed but a field had the wrong type.
Fields
UnknownCategory
The category field references a category that is not in the
known enum. Provide one of the shipped categories (self-bootstrap,
issue-tracking, code-review, self-feedback, meeting-notes, messenger)
or extend crate::skill::Category before shipping a new one.
Fields
InvalidYaml
Underlying YAML parser failure (syntax error inside the frontmatter).
NotFound
A skill lookup was asked for a name that the source does not know about.
Io
Filesystem operation failed while reading or writing a skill / manifest.
InvalidManifest
Manifest JSON parse failure.
SerdeJson
Non-manifest JSON (de)serialisation failure — used by the trace
subsystem for trace.jsonl records and meta.json writes so
callers do not see a misleading “manifest … invalid JSON”
error for a record that is not a manifest.
Trait Implementations§
Source§impl Debug for SkillError
impl Debug for SkillError
Source§impl Display for SkillError
impl Display for SkillError
Source§impl Error for SkillError
impl Error for SkillError
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()