pub struct NativeField {
pub dtype: DType,
pub dims: Vec<String>,
pub shape: Vec<usize>,
pub data: ArrayData,
pub fill_value: Option<f64>,
}Expand description
One native-grid array, keyed by its on-disk file_variable name and validated
against spec/schemas/native-field.schema.json. The native grid is the
loader’s own grid — regrid is ESD/C4’s job, not the reader’s.
Fields§
§dtype: DTypeLogical element type.
dims: Vec<String>Ordered dimension names (e.g. [time, latitude, longitude]).
shape: Vec<usize>Length of each dimension, in dims order.
data: ArrayDataFlattened values (row-major per shape).
fill_value: Option<f64>The native fill sentinel if one survives into the array, else None. CF
_FillValue cells are folded into NaN, so a decoded field reports None.
Implementations§
Source§impl NativeField
impl NativeField
Sourcepub fn select_leading(&self, i: usize) -> Result<NativeField>
pub fn select_leading(&self, i: usize) -> Result<NativeField>
Slice off the leading dimension at index i, returning the sub-array with
one fewer dimension. This is how a crate::Provider selects the current
record (time slice) from a multi-record file at a cadence boundary.
Errors if the field is scalar (no leading dim) or i is out of range.
Trait Implementations§
Source§impl Clone for NativeField
impl Clone for NativeField
Source§fn clone(&self) -> NativeField
fn clone(&self) -> NativeField
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for NativeField
impl RefUnwindSafe for NativeField
impl Send for NativeField
impl Sync for NativeField
impl Unpin for NativeField
impl UnsafeUnpin for NativeField
impl UnwindSafe for NativeField
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more