#[non_exhaustive]pub enum NomadsError {
Request {
what: &'static str,
value: String,
},
Grib(Grib2Error),
Mixed {
what: &'static str,
},
TimeUnit {
code: u8,
},
TooManyFields {
count: usize,
},
Duplicate {
category: u8,
number: u8,
surface: u8,
},
Outside {
latitude_deg: f64,
longitude_deg: f64,
},
NoSurface {
what: &'static str,
},
Height {
geopotential_m: f64,
reason: String,
},
Net(NetError),
}Expand description
Why a NOMADS request or cut was refused.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Request
A request field is outside its range.
Grib(Grib2Error)
The body is not GRIB2 the decoder reads.
Mixed
The cut’s fields differ in something they must share.
TimeUnit
The first field’s forecast time is in a unit other than those
hpr_io::grib2::Product::forecast_time_s converts.
TooManyFields
The cut holds more than MAX_FIELDS fields.
Duplicate
A variable is given twice on one surface.
Fields
Outside
The site is not inside the cut’s grid.
Fields
NoSurface
A ground value is not in the cut, or has no value around the site.
Height
A height is beyond what the geopotential conversion takes.
Net(NetError)
The fetch failed, or its answer was refused.
Trait Implementations§
Source§impl Debug for NomadsError
impl Debug for NomadsError
Source§impl Display for NomadsError
impl Display for NomadsError
Source§impl Error for NomadsError
impl Error for NomadsError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Grib2Error> for NomadsError
impl From<Grib2Error> for NomadsError
Source§fn from(source: Grib2Error) -> Self
fn from(source: Grib2Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for NomadsError
impl !UnwindSafe for NomadsError
impl Freeze for NomadsError
impl Send for NomadsError
impl Sync for NomadsError
impl Unpin for NomadsError
impl UnsafeUnpin for NomadsError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more