1#[derive(Clone, Debug, thiserror::Error, PartialEq, Eq)]
5pub enum Invalid {
6 #[error(
8 "`{0}` isn't a pack's name: `@scope/name`, each part lowercase letters, digits, `-`, `.`, `_` and `~`, not starting with `.` or `_`"
9 )]
10 Name(String),
11 #[error("`{0}` isn't a release: a pack's name, `@` and a version (`@kit/mermaid@1.2.0`)")]
13 Release(String),
14 #[error(
16 "`{0}` isn't a file's path in a pack: `/`-separated names, none of them empty, `.` or `..`, with no `\\` or `:`"
17 )]
18 Path(String),
19 #[error("`{0}` isn't an integrity: `sha256-`, `sha384-` or `sha512-` and a digest, in base64")]
21 Integrity(String),
22}