pub enum SkillMetadataError {
MissingFrontmatter,
FrontmatterTooLarge {
size: usize,
limit: usize,
},
InvalidYaml(String),
MissingField {
field: &'static str,
},
}Expand description
Errors that can occur while extracting SkillMetadata
from a SKILL.md’s YAML frontmatter.
Variants§
MissingFrontmatter
The content did not start with a ----delimited YAML frontmatter block.
FrontmatterTooLarge
The extracted frontmatter block exceeded MAX_FRONTMATTER_SIZE.
Fields
InvalidYaml(String)
The frontmatter block was not valid YAML.
The message is a rendering of the underlying serde_norway error
(captured eagerly rather than storing the error type itself, so this
crate’s public API is not pinned to a specific serde_norway
version) with its line number corrected to be relative to the whole
SKILL.md file rather than the extracted frontmatter block — the
block starts one line after the file’s opening --- delimiter.
MissingField
A required field was absent, or present but empty, in an otherwise valid frontmatter block.
Trait Implementations§
Source§impl Debug for SkillMetadataError
impl Debug for SkillMetadataError
Source§impl Display for SkillMetadataError
impl Display for SkillMetadataError
Source§impl Error for SkillMetadataError
impl Error for SkillMetadataError
1.30.0 · 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()