pub struct SubCommandGroupBuilder<T: Clone + Send + Sync> {
pub name: String,
pub name_localizations: Option<HashMap<String, String>>,
pub description: String,
pub description_localizations: Option<HashMap<String, String>>,
pub commands: Vec<SubCommandBuilder<T>>,
}
Fields§
§name: String
§name_localizations: Option<HashMap<String, String>>
§description: String
§description_localizations: Option<HashMap<String, String>>
§commands: Vec<SubCommandBuilder<T>>
Implementations§
Source§impl<T: Clone + Send + Sync> SubCommandGroupBuilder<T>
impl<T: Clone + Send + Sync> SubCommandGroupBuilder<T>
pub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
pub fn description_localizations<K: Into<String>, V: Into<String>>( self, localizations: impl IntoIterator<Item = (K, V)>, ) -> Self
pub fn name_localizations<K: Into<String>, V: Into<String>>( self, localizations: impl IntoIterator<Item = (K, V)>, ) -> Self
pub fn subcommand(self, subcommand: SubCommandBuilder<T>) -> Self
pub fn build(self) -> CommandOption
Trait Implementations§
Source§impl<T: Clone + Clone + Send + Sync> Clone for SubCommandGroupBuilder<T>
impl<T: Clone + Clone + Send + Sync> Clone for SubCommandGroupBuilder<T>
Source§fn clone(&self) -> SubCommandGroupBuilder<T>
fn clone(&self) -> SubCommandGroupBuilder<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Clone + Send + Sync> From<SubCommandGroupBuilder<T>> for CommandOption
impl<T: Clone + Send + Sync> From<SubCommandGroupBuilder<T>> for CommandOption
Source§fn from(value: SubCommandGroupBuilder<T>) -> Self
fn from(value: SubCommandGroupBuilder<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for SubCommandGroupBuilder<T>
impl<T> RefUnwindSafe for SubCommandGroupBuilder<T>
impl<T> Send for SubCommandGroupBuilder<T>
impl<T> Sync for SubCommandGroupBuilder<T>
impl<T> Unpin for SubCommandGroupBuilder<T>
impl<T> UnwindSafe for SubCommandGroupBuilder<T>
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