use super::*;
impl CliArgInfo {
pub const fn new(
name: &'static str,
description: &'static str,
arg_type: CliArgType,
required: bool,
default: Option<&'static str>,
) -> Self {
Self {
name,
description,
arg_type,
required,
default,
}
}
}
impl CliCommandRegistration {
pub const fn new(
name: &'static str,
version: &'static str,
description: &'static str,
handler_fn_name: &'static str,
) -> Self {
Self {
name,
version,
description,
handler_fn_name,
args: &[],
}
}
pub const fn with_args(self, args: &'static [CliArgInfo]) -> Self {
Self {
name: self.name,
version: self.version,
description: self.description,
handler_fn_name: self.handler_fn_name,
args,
}
}
}