domain/reservation/error.rs
1#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]
2/// Validation failures returned by reservation domain constructors.
3pub enum Error {
4 #[error("minimum age must be at least one week")]
5 /// Minimum age was below the accepted service-policy floor.
6 EmptyMinimumAge,
7 #[error("add-on label must not be empty")]
8 /// Add-on label was blank after trimming.
9 EmptyAddOnLabel,
10 #[error("add-on label must be 120 characters or fewer")]
11 /// Add-on label exceeded the customer-facing display limit.
12 AddOnLabelTooLong,
13}
14
15/// Result type returned by fallible reservation error operations.
16pub type Result<T> = std::result::Result<T, Error>;