nexrad_process/result.rs
1//! Result and error types for NEXRAD processing operations.
2
3/// Errors that can occur during processing.
4#[derive(Debug, thiserror::Error)]
5pub enum Error {
6 /// The input field has invalid geometry for this algorithm.
7 #[error("invalid field geometry: {0}")]
8 InvalidGeometry(String),
9
10 /// The algorithm requires data that is not present.
11 #[error("missing required data: {0}")]
12 MissingData(String),
13
14 /// A parameter value is out of the acceptable range.
15 #[error("invalid parameter: {0}")]
16 InvalidParameter(String),
17}
18
19/// Result type for processing operations.
20pub type Result<T> = std::result::Result<T, Error>;