#[non_exhaustive]pub enum WyomingError {
Request {
what: &'static str,
value: String,
},
Net(NetError),
Missing {
field: String,
},
Units {
field: &'static str,
found: String,
expected: &'static str,
},
Row {
line: usize,
reason: String,
},
NoGround {
line: usize,
},
GroundMisfit {
line: usize,
first: usize,
},
Misfit {
after: usize,
line: usize,
},
}Expand description
Why a Wyoming request or answer 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.
Net(NetError)
The fetch failed.
Missing
A column is absent.
Units
A column is in a unit other than the one required.
Fields
Row
A line can’t be read.
NoGround
There is no ground: no row, or a first row missing a value or with one out of range.
GroundMisfit
A chain of rows that fit, starting after the ground among the rows it could reach, beats every chain from the ground: more rows, or as many whose layers fit more closely. The ground is taken as wrong, and it can’t be left out.
Fields
Misfit
More than MAX_MISFITS rows follow the end of the chain of rows that fit: its end, or all
of them, are wrong, or rows with no temperature leave a layer too thick to check.
Trait Implementations§
Source§impl Debug for WyomingError
impl Debug for WyomingError
Source§impl Display for WyomingError
impl Display for WyomingError
Source§impl Error for WyomingError
impl Error for WyomingError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for WyomingError
impl !UnwindSafe for WyomingError
impl Freeze for WyomingError
impl Send for WyomingError
impl Sync for WyomingError
impl Unpin for WyomingError
impl UnsafeUnpin for WyomingError
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