pub struct NetcdfReader {
pub dimensions: HashMap<String, usize>,
pub variables: Vec<NetcdfVariable>,
pub global_attrs: Vec<(String, String)>,
pub unlimited_dim: Option<String>,
}Expand description
A simple CDL text reader.
Reads dimension, variable, and data sections from CDL output produced by
NetcdfWriter or NetcdfFile::write_cdl.
Fields§
§dimensions: HashMap<String, usize>Parsed dimensions (name → size).
variables: Vec<NetcdfVariable>Parsed variables.
global_attrs: Vec<(String, String)>Global attributes.
unlimited_dim: Option<String>Unlimited dimension name.
Implementations§
Source§impl NetcdfReader
impl NetcdfReader
Sourcepub fn get_dimension(&self, name: &str) -> Option<usize>
pub fn get_dimension(&self, name: &str) -> Option<usize>
Get dimension size by name.
Sourcepub fn get_variable(&self, name: &str) -> Option<&NetcdfVariable>
pub fn get_variable(&self, name: &str) -> Option<&NetcdfVariable>
Get variable by name.
Sourcepub fn variable_names(&self) -> Vec<&str>
pub fn variable_names(&self) -> Vec<&str>
List all variable names.
Sourcepub fn dimension_names(&self) -> Vec<&str>
pub fn dimension_names(&self) -> Vec<&str>
List all dimension names.
Trait Implementations§
Source§impl Clone for NetcdfReader
impl Clone for NetcdfReader
Source§fn clone(&self) -> NetcdfReader
fn clone(&self) -> NetcdfReader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NetcdfReader
impl RefUnwindSafe for NetcdfReader
impl Send for NetcdfReader
impl Sync for NetcdfReader
impl Unpin for NetcdfReader
impl UnsafeUnpin for NetcdfReader
impl UnwindSafe for NetcdfReader
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.