#[non_exhaustive]pub enum SkillError {
Name(NameError),
Description(usize),
Key(String),
Path(PathBuf),
Duplicate(String),
CaseCollision(PathBuf),
}Expand description
Why a skill was refused.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Name(NameError)
The name breaks the specification.
Description(usize)
The description is empty or longer than 1024 characters.
Key(String)
A frontmatter or metadata key is not a plain lowercase word, or is one the crate writes itself.
Path(PathBuf)
A file path is absolute, leaves the skill directory, or is SKILL.md.
Duplicate(String)
A frontmatter key or metadata key given twice. YAML forbids it, and tools disagree on which value wins.
CaseCollision(PathBuf)
A file path that differs from another, or from SKILL.md, only in
letter case: one file on the case-insensitive file systems of macOS
and Windows.
Trait Implementations§
Source§impl Clone for SkillError
impl Clone for SkillError
Source§impl Debug for SkillError
impl Debug for SkillError
Source§impl Display for SkillError
impl Display for SkillError
impl Eq for SkillError
Source§impl Error for SkillError
impl Error for SkillError
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()
Source§impl From<NameError> for SkillError
impl From<NameError> for SkillError
Source§impl PartialEq for SkillError
impl PartialEq for SkillError
impl StructuralPartialEq for SkillError
Auto Trait Implementations§
impl Freeze for SkillError
impl RefUnwindSafe for SkillError
impl Send for SkillError
impl Sync for SkillError
impl Unpin for SkillError
impl UnsafeUnpin for SkillError
impl UnwindSafe for SkillError
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