nexrad_render/result.rs
1//! Result and error types for NEXRAD rendering operations.
2
3use thiserror::Error as ThisError;
4
5/// A specialized Result type for NEXRAD rendering operations.
6pub type Result<T> = std::result::Result<T, Error>;
7
8/// Errors that can occur during NEXRAD rendering.
9#[derive(ThisError, Debug)]
10pub enum Error {
11 /// The requested radar product was not found in the radial data.
12 #[error("requested product not found in radial data")]
13 ProductNotFound,
14 /// No radials were provided for rendering.
15 #[error("no radials provided for rendering")]
16 NoRadials,
17 /// The image dimensions were invalid for creating an image buffer.
18 #[error("invalid image dimensions")]
19 InvalidDimensions,
20 /// An error occurred while saving an image to disk.
21 #[error("image save error: {0}")]
22 ImageSave(String),
23}