pub struct Group {
pub name: String,
pub datasets: Vec<Dataset>,
pub subgroups: Vec<Group>,
pub attributes: Vec<Attribute>,
}Expand description
A named container that holds datasets, subgroups, and attributes.
Fields§
§name: String§datasets: Vec<Dataset>§subgroups: Vec<Group>§attributes: Vec<Attribute>Implementations§
Source§impl Group
impl Group
Sourcepub fn add_dataset(&mut self, ds: Dataset)
pub fn add_dataset(&mut self, ds: Dataset)
Adds a dataset to this group.
Sourcepub fn add_subgroup(&mut self, g: Group)
pub fn add_subgroup(&mut self, g: Group)
Adds a subgroup to this group.
Sourcepub fn get_dataset(&self, name: &str) -> Option<&Dataset>
pub fn get_dataset(&self, name: &str) -> Option<&Dataset>
Looks up a dataset by name.
Sourcepub fn get_subgroup(&self, name: &str) -> Option<&Group>
pub fn get_subgroup(&self, name: &str) -> Option<&Group>
Looks up a direct subgroup by name.
Sourcepub fn add_attribute(&mut self, attr: Attribute)
pub fn add_attribute(&mut self, attr: Attribute)
Appends an attribute to this group.
Sourcepub fn get_attribute(&self, name: &str) -> Option<&Attribute>
pub fn get_attribute(&self, name: &str) -> Option<&Attribute>
Looks up an attribute by name.
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 UnsafeUnpin 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<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.