pub struct GroupMut<'f>(/* private fields */);
Expand description
Implementations§
source§impl<'f> GroupMut<'f>
impl<'f> GroupMut<'f>
sourcepub fn variable_mut<'g>(&'g mut self, name: &str) -> Option<VariableMut<'g>>where
'f: 'g,
pub fn variable_mut<'g>(&'g mut self, name: &str) -> Option<VariableMut<'g>>where
'f: 'g,
Get a mutable variable from the group
sourcepub fn variables_mut<'g>(&'g mut self) -> impl Iterator<Item = VariableMut<'g>>where
'f: 'g,
pub fn variables_mut<'g>(&'g mut self) -> impl Iterator<Item = VariableMut<'g>>where
'f: 'g,
Iterate over all variables in a group, with mutable access
sourcepub fn group_mut<'g>(&'g mut self, name: &str) -> Option<GroupMut<'g>>where
'f: 'g,
pub fn group_mut<'g>(&'g mut self, name: &str) -> Option<GroupMut<'g>>where
'f: 'g,
Mutable access to subgroup
sourcepub fn groups_mut<'g>(&'g mut self) -> impl Iterator<Item = GroupMut<'g>>where
'f: 'g,
pub fn groups_mut<'g>(&'g mut self) -> impl Iterator<Item = GroupMut<'g>>where
'f: 'g,
Iterator over all groups (mutable access)
sourcepub fn add_opaque_type(
&'f mut self,
name: &str,
size: usize
) -> Result<OpaqueType>
pub fn add_opaque_type( &'f mut self, name: &str, size: usize ) -> Result<OpaqueType>
Add an opaque datatype, with size
bytes
sourcepub fn add_vlen_type<T: NcPutGet>(&'f mut self, name: &str) -> Result<VlenType>
pub fn add_vlen_type<T: NcPutGet>(&'f mut self, name: &str) -> Result<VlenType>
Add a variable length datatype
sourcepub fn add_enum_type<T: NcPutGet>(
&'f mut self,
name: &str,
mappings: &[(&str, T)]
) -> Result<EnumType>
pub fn add_enum_type<T: NcPutGet>( &'f mut self, name: &str, mappings: &[(&str, T)] ) -> Result<EnumType>
Add an enum datatype
sourcepub fn add_compound_type(&mut self, name: &str) -> Result<CompoundBuilder>
pub fn add_compound_type(&mut self, name: &str) -> Result<CompoundBuilder>
Build a compound type
sourcepub fn add_attribute<'a, T>(
&'a mut self,
name: &str,
val: T
) -> Result<Attribute<'a>>where
T: Into<AttributeValue>,
pub fn add_attribute<'a, T>(
&'a mut self,
name: &str,
val: T
) -> Result<Attribute<'a>>where
T: Into<AttributeValue>,
Add an attribute to the group
sourcepub fn add_dimension<'g>(
&'g mut self,
name: &str,
len: usize
) -> Result<Dimension<'g>>
pub fn add_dimension<'g>( &'g mut self, name: &str, len: usize ) -> Result<Dimension<'g>>
Adds a dimension with the given name and size. A size of zero gives an unlimited dimension
sourcepub fn add_unlimited_dimension<'g>(
&'g mut self,
name: &str
) -> Result<Dimension<'g>>
pub fn add_unlimited_dimension<'g>( &'g mut self, name: &str ) -> Result<Dimension<'g>>
Adds a dimension with unbounded size
sourcepub fn add_group<'g>(&'g mut self, name: &str) -> Result<GroupMut<'g>>where
'f: 'g,
pub fn add_group<'g>(&'g mut self, name: &str) -> Result<GroupMut<'g>>where
'f: 'g,
Add an empty group to the dataset
sourcepub fn add_variable<'g, T>(
&'g mut self,
name: &str,
dims: &[&str]
) -> Result<VariableMut<'g>>where
T: NcPutGet,
'f: 'g,
pub fn add_variable<'g, T>(
&'g mut self,
name: &str,
dims: &[&str]
) -> Result<VariableMut<'g>>where
T: NcPutGet,
'f: 'g,
Create a Variable into the dataset, with no data written into it
Dimensions are identified using the name of the dimension, and will recurse upwards if not found in the current group.
sourcepub fn add_string_variable<'g>(
&mut self,
name: &str,
dims: &[&str]
) -> Result<VariableMut<'g>>
pub fn add_string_variable<'g>( &mut self, name: &str, dims: &[&str] ) -> Result<VariableMut<'g>>
Adds a variable with a basic type of string
sourcepub fn add_variable_from_identifiers<'g, T>(
&'g mut self,
name: &str,
dims: &[DimensionIdentifier]
) -> Result<VariableMut<'g>>where
T: NcPutGet,
pub fn add_variable_from_identifiers<'g, T>(
&'g mut self,
name: &str,
dims: &[DimensionIdentifier]
) -> Result<VariableMut<'g>>where
T: NcPutGet,
Adds a variable from a set of unique identifiers, recursing upwards from the current group if necessary.
sourcepub fn add_variable_with_type(
&'f mut self,
name: &str,
dims: &[&str],
typ: &VariableType
) -> Result<VariableMut<'f>>
pub fn add_variable_with_type( &'f mut self, name: &str, dims: &[&str], typ: &VariableType ) -> Result<VariableMut<'f>>
Create a variable with the specified type
Methods from Deref<Target = Group<'f>>§
sourcepub fn variable<'g>(&'g self, name: &str) -> Option<Variable<'g>>where
'f: 'g,
pub fn variable<'g>(&'g self, name: &str) -> Option<Variable<'g>>where
'f: 'g,
Get a variable from the group
sourcepub fn variables<'g>(&'g self) -> impl Iterator<Item = Variable<'g>>where
'f: 'g,
pub fn variables<'g>(&'g self) -> impl Iterator<Item = Variable<'g>>where
'f: 'g,
Iterate over all variables in a group
sourcepub fn attributes(&self) -> impl Iterator<Item = Attribute<'_>>
pub fn attributes(&self) -> impl Iterator<Item = Attribute<'_>>
Get all attributes in the group
sourcepub fn attribute_value(&self, name: &str) -> Option<Result<AttributeValue>>
pub fn attribute_value(&self, name: &str) -> Option<Result<AttributeValue>>
Get the attribute value
sourcepub fn dimension<'g>(&'g self, name: &str) -> Option<Dimension<'g>>where
'f: 'g,
pub fn dimension<'g>(&'g self, name: &str) -> Option<Dimension<'g>>where
'f: 'g,
Get a single dimension
sourcepub fn dimensions<'g>(&'g self) -> impl Iterator<Item = Dimension<'g>>where
'f: 'g,
pub fn dimensions<'g>(&'g self) -> impl Iterator<Item = Dimension<'g>>where
'f: 'g,
Iterator over all dimensions
sourcepub fn groups<'g>(&'g self) -> impl Iterator<Item = Group<'g>>where
'f: 'g,
pub fn groups<'g>(&'g self) -> impl Iterator<Item = Group<'g>>where
'f: 'g,
Iterator over all subgroups in this group
sourcepub fn types(&self) -> impl Iterator<Item = VariableType>
pub fn types(&self) -> impl Iterator<Item = VariableType>
Return all types in this group