//! Manifest error types. use thiserror::Error; #[derive(Debug, Error)] pub enum ManifestError { #[error("io error: {0}")] Io(#[from] std::io::Error), #[error("toml parse error: {0}")] Toml(#[from] toml::de::Error), #[error("semver parse error for '{field}': {source}")] Semver { field: String, #[source] source: semver::Error, }, #[error("missing required field: {0}")] MissingField(String), #[error("invalid value for '{field}': {reason}")] InvalidValue { field: String, reason: String }, #[error("el.toml not found (searched from {0})")] NotFound(String), #[error("invalid cross target '{0}': use x86_64-linux, aarch64-linux, x86_64-macos, aarch64-macos, wasm32")] InvalidCrossTarget(String), #[error("invalid build target '{0}': use debug, release, prod")] InvalidBuildTarget(String), #[error("invalid seal key source '{0}': use env:VAR, file:path, or literal")] InvalidSealKeySource(String), } pub type ManifestResult = Result;