macro_rules! command_group_config {
($(#[doc=$doc:literal] $group:ident),*) => {
#[derive(Clone, Debug, Default)]
pub struct CommandGroupConfig {
$(pub(crate) $group: bool,)*
}
impl CommandGroupConfig {
pub fn all_groups(mut self, enabled: bool) -> Self {
$(
self.$group = enabled;
)*
self
}
$(
paste::item! {
#[doc=$doc]
#[inline]
pub fn [< $group _group>](mut self, enabled: bool) -> Self {
self.$group = enabled;
self
}
}
)*
}
}
}
command_group_config!(
core,
debug,
filter,
chart,
misc,
path,
system,
string,
bit,
byte,
file_system,
platform,
date,
shell,
format,
viewer,
conversion,
environment,
math,
network,
random,
generator,
hash,
experimental
);