Struct grib::FixedSurface
source · pub struct FixedSurface {
pub surface_type: u8,
pub scale_factor: i8,
pub scaled_value: i32,
}
Fields§
§surface_type: u8
Use CodeTable4_5 to get textual representation.
scale_factor: i8
§scaled_value: i32
Implementations§
source§impl FixedSurface
impl FixedSurface
pub fn new(surface_type: u8, scale_factor: i8, scaled_value: i32) -> Self
pub fn value(&self) -> f64
sourcepub fn unit(&self) -> Option<&str>
pub fn unit(&self) -> Option<&str>
Returns the unit string defined for the type of the surface, if any.
§Examples
assert_eq!(grib::FixedSurface::new(100, 0, 0).unit(), Some("Pa"));
sourcepub fn scale_factor_is_nan(&self) -> bool
pub fn scale_factor_is_nan(&self) -> bool
Checks if the scale factor should be treated as missing.
sourcepub fn value_is_nan(&self) -> bool
pub fn value_is_nan(&self) -> bool
Checks if the scaled value should be treated as missing.
pub fn describe(&self) -> (String, String, String)
Trait Implementations§
source§impl Debug for FixedSurface
impl Debug for FixedSurface
source§impl PartialEq for FixedSurface
impl PartialEq for FixedSurface
source§fn eq(&self, other: &FixedSurface) -> bool
fn eq(&self, other: &FixedSurface) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for FixedSurface
impl StructuralPartialEq for FixedSurface
Auto Trait Implementations§
impl Freeze for FixedSurface
impl RefUnwindSafe for FixedSurface
impl Send for FixedSurface
impl Sync for FixedSurface
impl Unpin for FixedSurface
impl UnwindSafe for FixedSurface
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