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.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 more