Skip to main content

NcFileBuilder

Struct NcFileBuilder 

Source
pub struct NcFileBuilder { /* private fields */ }
Expand description

Builder for a single NetCDF file.

Implementations§

Source§

impl NcFileBuilder

Source

pub fn new() -> Self

Source

pub fn add_dimension( &mut self, name: impl Into<String>, size: u64, ) -> Result<DimensionId>

Source

pub fn add_dimension_path( &mut self, path: impl Into<String>, size: u64, ) -> Result<DimensionId>

Source

pub fn add_unlimited_dimension( &mut self, name: impl Into<String>, ) -> Result<DimensionId>

Source

pub fn add_unlimited_dimension_path( &mut self, path: impl Into<String>, ) -> Result<DimensionId>

Source

pub fn add_attribute( &mut self, name: impl Into<String>, value: NcAttrValue, ) -> Result<()>

Source

pub fn add_group_attribute( &mut self, group_path: impl Into<String>, name: impl Into<String>, value: NcAttrValue, ) -> Result<()>

Source

pub fn add_variable<T: NcWriteType>( &mut self, name: impl Into<String>, dimensions: &[DimensionId], ) -> Result<VariableId>

Source

pub fn add_variable_path<T: NcWriteType>( &mut self, path: impl Into<String>, dimensions: &[DimensionId], ) -> Result<VariableId>

Source

pub fn add_char_variable( &mut self, name: impl Into<String>, dimensions: &[DimensionId], ) -> Result<VariableId>

Source

pub fn add_char_variable_path( &mut self, path: impl Into<String>, dimensions: &[DimensionId], ) -> Result<VariableId>

Source

pub fn add_string_variable( &mut self, name: impl Into<String>, dimensions: &[DimensionId], ) -> Result<VariableId>

Source

pub fn add_string_variable_path( &mut self, path: impl Into<String>, dimensions: &[DimensionId], ) -> Result<VariableId>

Source

pub fn add_user_defined_variable( &mut self, name: impl Into<String>, dimensions: &[DimensionId], dtype: NcType, ) -> Result<VariableId>

Source

pub fn add_user_defined_variable_path( &mut self, path: impl Into<String>, dimensions: &[DimensionId], dtype: NcType, ) -> Result<VariableId>

Source

pub fn add_variable_attribute( &mut self, variable: VariableId, name: impl Into<String>, value: NcAttrValue, ) -> Result<()>

Source

pub fn set_variable_fill_value<T: NcFillValueType>( &mut self, variable: VariableId, value: T, ) -> Result<()>

Source

pub fn set_variable_chunking( &mut self, variable: VariableId, chunk_shape: impl Into<Vec<u64>>, ) -> Result<()>

Source

pub fn set_variable_shuffle( &mut self, variable: VariableId, enabled: bool, ) -> Result<()>

Source

pub fn set_variable_deflate( &mut self, variable: VariableId, level: Option<u8>, shuffle: bool, ) -> Result<()>

Source

pub fn set_variable_fletcher32( &mut self, variable: VariableId, enabled: bool, ) -> Result<()>

Source

pub fn write_variable<T: NcWriteType>( &mut self, variable: VariableId, values: &[T], ) -> Result<()>

Source

pub fn write_variable_slice<T: NcWriteType>( &mut self, variable: VariableId, selection: &NcSliceInfo, values: &[T], ) -> Result<()>

Source

pub fn write_char_variable( &mut self, variable: VariableId, bytes: &[u8], ) -> Result<()>

Source

pub fn write_char_variable_slice( &mut self, variable: VariableId, selection: &NcSliceInfo, bytes: &[u8], ) -> Result<()>

Source

pub fn write_char_variable_strings<S: AsRef<str>>( &mut self, variable: VariableId, values: &[S], ) -> Result<()>

Source

pub fn write_char_variable_strings_slice<S: AsRef<str>>( &mut self, variable: VariableId, selection: &NcSliceInfo, values: &[S], ) -> Result<()>

Source

pub fn write_user_defined_variable_bytes( &mut self, variable: VariableId, bytes: &[u8], ) -> Result<()>

Source

pub fn write_user_defined_variable_slice_bytes( &mut self, variable: VariableId, selection: &NcSliceInfo, bytes: &[u8], ) -> Result<()>

Source

pub fn write_enum_variable( &mut self, variable: VariableId, values: &[NcIntegerValue], ) -> Result<()>

Source

pub fn write_enum_variable_slice( &mut self, variable: VariableId, selection: &NcSliceInfo, values: &[NcIntegerValue], ) -> Result<()>

Source

pub fn write_opaque_variable<S: AsRef<[u8]>>( &mut self, variable: VariableId, values: &[S], ) -> Result<()>

Source

pub fn write_opaque_variable_slice<S: AsRef<[u8]>>( &mut self, variable: VariableId, selection: &NcSliceInfo, values: &[S], ) -> Result<()>

Source

pub fn write_array_variable<T: NcWriteType>( &mut self, variable: VariableId, values: &[T], ) -> Result<()>

Source

pub fn write_array_variable_slice<T: NcWriteType>( &mut self, variable: VariableId, selection: &NcSliceInfo, values: &[T], ) -> Result<()>

Source

pub fn write_vlen_variable_bytes<S: AsRef<[u8]>>( &mut self, variable: VariableId, values: &[S], ) -> Result<()>

Source

pub fn write_vlen_variable<T: NcWriteType>( &mut self, variable: VariableId, values: &[Vec<T>], ) -> Result<()>

Source

pub fn write_vlen_variable_slice_bytes<S: AsRef<[u8]>>( &mut self, variable: VariableId, selection: &NcSliceInfo, values: &[S], ) -> Result<()>

Source

pub fn write_vlen_variable_slice<T: NcWriteType>( &mut self, variable: VariableId, selection: &NcSliceInfo, values: &[Vec<T>], ) -> Result<()>

Source

pub fn write_string_variable<S: AsRef<str>>( &mut self, variable: VariableId, values: &[S], ) -> Result<()>

Source

pub fn write_string_variable_slice<S: AsRef<str>>( &mut self, variable: VariableId, selection: &NcSliceInfo, values: &[S], ) -> Result<()>

Source

pub fn write<W: Write>( &self, writer: W, options: NcWriteOptions, ) -> Result<NcFormat>

Source

pub fn to_vec(&self, options: NcWriteOptions) -> Result<(NcFormat, Vec<u8>)>

Trait Implementations§

Source§

impl Clone for NcFileBuilder

Source§

fn clone(&self) -> NcFileBuilder

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NcFileBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NcFileBuilder

Source§

fn default() -> NcFileBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.