pub struct CommandGroup { /* private fields */ }Expand description
A titled section of CommandItems.
The heading is hidden while every item in the group is filtered out.
Implementations§
Source§impl CommandGroup
impl CommandGroup
Sourcepub fn label(self, label: impl Into<SharedString>) -> Self
pub fn label(self, label: impl Into<SharedString>) -> Self
Set the label displayed above the group’s items.
Sourcepub fn item(self, item: CommandItem) -> Self
pub fn item(self, item: CommandItem) -> Self
Add an item to the group.
Sourcepub fn items(self, items: impl IntoIterator<Item = CommandItem>) -> Self
pub fn items(self, items: impl IntoIterator<Item = CommandItem>) -> Self
Add multiple items to the group.
Sourcepub fn heading(&self) -> Option<&SharedString>
pub fn heading(&self) -> Option<&SharedString>
The heading of the group, when it has one.
Trait Implementations§
Source§impl Clone for CommandGroup
impl Clone for CommandGroup
Source§impl From<CommandGroup> for CommandEntry
impl From<CommandGroup> for CommandEntry
Source§fn from(group: CommandGroup) -> Self
fn from(group: CommandGroup) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for CommandGroup
impl !Send for CommandGroup
impl !Sync for CommandGroup
impl !UnwindSafe for CommandGroup
impl Freeze for CommandGroup
impl Unpin for CommandGroup
impl UnsafeUnpin for CommandGroup
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> 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> ⓘ
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 more