pub struct Group {
pub name: String,
pub groups: HashMap<String, Group>,
pub datasets: HashMap<String, Dataset>,
pub attributes: HashMap<String, AttributeValue>,
}Expand description
HDF5 group
Fields§
§name: StringGroup name
groups: HashMap<String, Group>Child groups
datasets: HashMap<String, Dataset>Datasets in this group
attributes: HashMap<String, AttributeValue>Attributes
Implementations§
Source§impl Group
impl Group
Sourcepub fn create_group(&mut self, name: &str) -> &mut Group
pub fn create_group(&mut self, name: &str) -> &mut Group
Create a subgroup
Sourcepub fn get_group_mut(&mut self, name: &str) -> Option<&mut Group>
pub fn get_group_mut(&mut self, name: &str) -> Option<&mut Group>
Get a mutable subgroup
Sourcepub fn set_attribute(&mut self, name: &str, value: AttributeValue)
pub fn set_attribute(&mut self, name: &str, value: AttributeValue)
Add an attribute
Sourcepub fn get_attribute(&self, name: &str) -> Option<&AttributeValue>
pub fn get_attribute(&self, name: &str) -> Option<&AttributeValue>
Get an attribute by name
Sourcepub fn remove_attribute(&mut self, name: &str) -> Option<AttributeValue>
pub fn remove_attribute(&mut self, name: &str) -> Option<AttributeValue>
Remove an attribute
Sourcepub fn attribute_names(&self) -> Vec<&str>
pub fn attribute_names(&self) -> Vec<&str>
List all attribute names
Sourcepub fn has_attribute(&self, name: &str) -> bool
pub fn has_attribute(&self, name: &str) -> bool
Check if group has a specific attribute
Sourcepub fn get_dataset(&self, name: &str) -> Option<&Dataset>
pub fn get_dataset(&self, name: &str) -> Option<&Dataset>
Get dataset by name
Sourcepub fn get_dataset_mut(&mut self, name: &str) -> Option<&mut Dataset>
pub fn get_dataset_mut(&mut self, name: &str) -> Option<&mut Dataset>
Get mutable dataset by name
Sourcepub fn dataset_names(&self) -> Vec<&str>
pub fn dataset_names(&self) -> Vec<&str>
List all dataset names
Sourcepub fn group_names(&self) -> Vec<&str>
pub fn group_names(&self) -> Vec<&str>
List all group names
Sourcepub fn has_dataset(&self, name: &str) -> bool
pub fn has_dataset(&self, name: &str) -> bool
Check if group has a specific dataset
Sourcepub fn remove_dataset(&mut self, name: &str) -> Option<Dataset>
pub fn remove_dataset(&mut self, name: &str) -> Option<Dataset>
Remove a dataset
Sourcepub fn remove_group(&mut self, name: &str) -> Option<Group>
pub fn remove_group(&mut self, name: &str) -> Option<Group>
Remove a subgroup
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Group
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnwindSafe for Group
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<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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.