#[non_exhaustive]pub struct NetCdf {
pub dimensions: Vec<(String, Option<usize>)>,
pub attributes: Vec<(String, NcValue)>,
pub variables: Vec<NcVariable>,
pub numrecs: usize,
pub version: u8,
}Expand description
The contents of a NetCDF-3 file.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dimensions: Vec<(String, Option<usize>)>Dimension names and lengths; None for the unlimited (record) dimension.
attributes: Vec<(String, NcValue)>§variables: Vec<NcVariable>§numrecs: usizeThe number of records along the unlimited dimension.
version: u81 for the classic format, 2 for 64-bit offsets.
Implementations§
Source§impl NetCdf
impl NetCdf
pub fn new() -> Self
pub fn with_dimension(self, name: &str, length: Option<usize>) -> Self
pub fn with_attribute(self, name: &str, value: NcValue) -> Self
Sourcepub fn with_variable(self, v: NcVariable) -> Self
pub fn with_variable(self, v: NcVariable) -> Self
Adds a variable; along the unlimited dimension the number of records follows its data.
Sourcepub fn variable(&self, name: &str) -> Option<&NcVariable>
pub fn variable(&self, name: &str) -> Option<&NcVariable>
The variable with this name.
Sourcepub fn shape(&self, v: &NcVariable) -> Vec<usize>
pub fn shape(&self, v: &NcVariable) -> Vec<usize>
The lengths of a variable’s dimensions (the record dimension as numrecs).
Trait Implementations§
impl StructuralPartialEq for NetCdf
Auto Trait Implementations§
impl Freeze for NetCdf
impl RefUnwindSafe for NetCdf
impl Send for NetCdf
impl Sync for NetCdf
impl Unpin for NetCdf
impl UnsafeUnpin for NetCdf
impl UnwindSafe for NetCdf
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