pub struct Group { /* private fields */ }Expand description
A group that can contain structures and other groups.
Groups provide organizational hierarchy for structures in the viewer. Enabling or disabling a group affects all of its descendants.
Implementations§
Source§impl Group
impl Group
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns whether this group is enabled.
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Sets whether this group is enabled.
Sourcepub fn show_child_details(&self) -> bool
pub fn show_child_details(&self) -> bool
Returns whether child details should be shown in UI.
Sourcepub fn set_show_child_details(&mut self, show: bool)
pub fn set_show_child_details(&mut self, show: bool)
Sets whether child details should be shown in UI.
Sourcepub fn parent_group(&self) -> Option<&str>
pub fn parent_group(&self) -> Option<&str>
Returns the parent group name, if any.
Sourcepub fn set_parent_group(&mut self, parent: Option<String>)
pub fn set_parent_group(&mut self, parent: Option<String>)
Sets the parent group.
Sourcepub fn add_structure(&mut self, type_name: &str, name: &str)
pub fn add_structure(&mut self, type_name: &str, name: &str)
Adds a structure to this group.
The structure is identified by “type_name:name” format.
Sourcepub fn remove_structure(&mut self, type_name: &str, name: &str)
pub fn remove_structure(&mut self, type_name: &str, name: &str)
Removes a structure from this group.
Sourcepub fn contains_structure(&self, type_name: &str, name: &str) -> bool
pub fn contains_structure(&self, type_name: &str, name: &str) -> bool
Returns whether this group contains a structure.
Sourcepub fn add_child_group(&mut self, group_name: &str)
pub fn add_child_group(&mut self, group_name: &str)
Adds a child group.
Sourcepub fn remove_child_group(&mut self, group_name: &str)
pub fn remove_child_group(&mut self, group_name: &str)
Removes a child group.
Sourcepub fn contains_child_group(&self, group_name: &str) -> bool
pub fn contains_child_group(&self, group_name: &str) -> bool
Returns whether this group contains a child group.
Sourcepub fn child_structures(&self) -> impl Iterator<Item = (&str, &str)>
pub fn child_structures(&self) -> impl Iterator<Item = (&str, &str)>
Returns the child structure identifiers.
Sourcepub fn child_groups(&self) -> impl Iterator<Item = &str>
pub fn child_groups(&self) -> impl Iterator<Item = &str>
Returns the child group names.
Sourcepub fn num_child_structures(&self) -> usize
pub fn num_child_structures(&self) -> usize
Returns the number of child structures.
Sourcepub fn num_child_groups(&self) -> usize
pub fn num_child_groups(&self) -> usize
Returns the number of child groups.