#[non_exhaustive]pub enum Grib2Error {
NotGrib {
offset: usize,
head: String,
},
Edition {
offset: usize,
edition: u8,
},
Truncated {
message: usize,
what: &'static str,
needed: u64,
available: u64,
},
Malformed {
message: usize,
reason: String,
},
Unsupported {
message: usize,
what: &'static str,
value: u64,
},
PointOutside {
index: u64,
points: u64,
},
}Expand description
Why a GRIB2 file 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.
NotGrib
The bytes at a message’s start are not GRIB.
Edition
A GRIB message of another edition (edition 1 is the older format).
Truncated
A message or a section runs past the end of the bytes it has.
Fields
Malformed
A message breaks the format.
Unsupported
A template or an option the reader does not handle.
Fields
PointOutside
A grid point asked for is outside the grid.
Trait Implementations§
Source§impl Clone for Grib2Error
impl Clone for Grib2Error
Source§fn clone(&self) -> Grib2Error
fn clone(&self) -> Grib2Error
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Grib2Error
impl Debug for Grib2Error
Source§impl Display for Grib2Error
impl Display for Grib2Error
impl Eq for Grib2Error
Source§impl Error for Grib2Error
impl Error for Grib2Error
1.30.0 · 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 PartialEq for Grib2Error
impl PartialEq for Grib2Error
Source§fn eq(&self, other: &Grib2Error) -> bool
fn eq(&self, other: &Grib2Error) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Grib2Error
Auto Trait Implementations§
impl Freeze for Grib2Error
impl RefUnwindSafe for Grib2Error
impl Send for Grib2Error
impl Sync for Grib2Error
impl Unpin for Grib2Error
impl UnsafeUnpin for Grib2Error
impl UnwindSafe for Grib2Error
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.