lightshuttle_spec/error.rs
1//! Error type returned while resolving a manifest resource into a
2//! container specification.
3
4/// Shorthand alias for `std::result::Result<T, SpecError>`.
5pub type Result<T> = std::result::Result<T, SpecError>;
6
7/// Errors raised while building a [`crate::ContainerSpec`] from a
8/// manifest resource declaration.
9#[derive(Debug, thiserror::Error)]
10pub enum SpecError {
11 /// The resolved specification is structurally invalid (bad port,
12 /// volume, duration or healthcheck declaration).
13 #[error("invalid container spec: {0}")]
14 InvalidSpec(String),
15}