pub trait MissingValue {
// Required methods
fn missing() -> Self;
fn is_missing(&self) -> bool;
}Expand description
Missing values defined in the GRIB2 regulation.
Regulation 92.1.4 states as follows:
All bits set to “1” for any value indicates that value is missing. This rule shall not apply to packed data.
§Examples
use grib::{MissingValue, TryFromSlice};
let missing = i32::missing();
let read_from_slice =
i32::try_from_slice(&[0xff, 0xff, 0xff, 0xff].as_slice(), &mut 0).unwrap();
assert_eq!(missing, read_from_slice);
assert!(missing.is_missing());Required Methods§
Sourcefn is_missing(&self) -> bool
fn is_missing(&self) -> bool
Checks if the value is regarded as a missing value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".