pub struct Variable<'f> { /* private fields */ }Expand description
A NetCDF-4 variable backed by an HDF5 dataset.
Implementations§
Source§impl<'f> Variable<'f>
impl<'f> Variable<'f>
Sourcepub fn dimensions(&self) -> &[Dimension]
pub fn dimensions(&self) -> &[Dimension]
The dimensions of this variable.
Sourcepub fn attrs(&mut self) -> Result<&HashMap<String, AttrValue>, Error>
pub fn attrs(&mut self) -> Result<&HashMap<String, AttrValue>, Error>
Read all attributes as a HashMap.
Sourcepub fn cf_attributes(&mut self) -> Result<CfAttributes, Error>
pub fn cf_attributes(&mut self) -> Result<CfAttributes, Error>
Extract CF convention attributes.
Sourcepub fn read_f64(&mut self) -> Result<Vec<f64>, Error>
pub fn read_f64(&mut self) -> Result<Vec<f64>, Error>
Read data as f64 with scale_factor/add_offset applied.
Missing values (matching _FillValue or missing_value) become NaN.
If no scale_factor or add_offset attributes exist, returns the raw f64 data.
Sourcepub fn read_raw_f64(&self) -> Result<Vec<f64>, Error>
pub fn read_raw_f64(&self) -> Result<Vec<f64>, Error>
Read raw data as f64 without any scale/offset transformation.
Sourcepub fn read_raw_f32(&self) -> Result<Vec<f32>, Error>
pub fn read_raw_f32(&self) -> Result<Vec<f32>, Error>
Read raw data as f32 without any scale/offset transformation.
Sourcepub fn read_raw_i32(&self) -> Result<Vec<i32>, Error>
pub fn read_raw_i32(&self) -> Result<Vec<i32>, Error>
Read raw data as i32 without any scale/offset transformation.
Sourcepub fn read_raw_i64(&self) -> Result<Vec<i64>, Error>
pub fn read_raw_i64(&self) -> Result<Vec<i64>, Error>
Read raw data as i64 without any scale/offset transformation.
Sourcepub fn read_raw_u64(&self) -> Result<Vec<u64>, Error>
pub fn read_raw_u64(&self) -> Result<Vec<u64>, Error>
Read raw data as u64 without any scale/offset transformation.
Sourcepub fn is_coordinate(&self) -> bool
pub fn is_coordinate(&self) -> bool
Whether this is a coordinate variable (name matches a dimension name).
Trait Implementations§
Auto Trait Implementations§
impl<'f> Freeze for Variable<'f>
impl<'f> RefUnwindSafe for Variable<'f>
impl<'f> Send for Variable<'f>
impl<'f> Sync for Variable<'f>
impl<'f> Unpin for Variable<'f>
impl<'f> UnsafeUnpin for Variable<'f>
impl<'f> UnwindSafe for Variable<'f>
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