pub struct ItuError { /* private fields */ }Expand description
Error returned by ITU-R model loading, validation, and calculation routines.
Implementations§
Source§impl ItuError
impl ItuError
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Returns the human-readable error message.
The message names the input or model-loading problem that caused the operation to fail. Validation errors do not require ITU-R data to be loaded, so they are useful for checking bad inputs before any grid files are touched.
§Example
let err = itu_rs::rainfall_rate_r001_mmh(91.0, 0.0).unwrap_err();
assert_eq!(err.message(), "lat_deg must be in [-90, 90]");Trait Implementations§
Source§impl Error for ItuError
impl Error for ItuError
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()
impl Eq for ItuError
impl StructuralPartialEq for ItuError
Auto Trait Implementations§
impl Freeze for ItuError
impl RefUnwindSafe for ItuError
impl Send for ItuError
impl Sync for ItuError
impl Unpin for ItuError
impl UnsafeUnpin for ItuError
impl UnwindSafe for ItuError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.