pub struct CommandBuilder {
pub cli_index: usize,
pub paths: Vec<Vec<String>>,
pub options: BTreeMap<String, OptionDefinition>,
pub preferred_names: HashMap<String, String>,
pub required_options: Vec<String>,
pub valid_bindings: HashSet<String>,
pub arity: Arity,
}Fields§
§cli_index: usize§paths: Vec<Vec<String>>§options: BTreeMap<String, OptionDefinition>§preferred_names: HashMap<String, String>§required_options: Vec<String>§valid_bindings: HashSet<String>§arity: ArityImplementations§
Source§impl CommandBuilder
impl CommandBuilder
pub fn new(cli_index: usize) -> CommandBuilder
pub fn usage(&self, opts: CommandUsageOptions) -> CommandUsageResult
pub fn make_default(&mut self) -> &mut Self
pub fn add_path(&mut self, path: Vec<String>) -> &mut Self
pub fn add_positional( &mut self, required: bool, name: &str, ) -> Result<&mut Self, BuildError>
pub fn add_rest(&mut self, name: &str) -> Result<&mut Self, BuildError>
pub fn add_proxy(&mut self, name: &str) -> Result<&mut Self, BuildError>
pub fn add_option( &mut self, option: OptionDefinition, ) -> Result<&mut Self, BuildError>
pub fn compile(&self) -> Machine
Auto Trait Implementations§
impl Freeze for CommandBuilder
impl RefUnwindSafe for CommandBuilder
impl Send for CommandBuilder
impl Sync for CommandBuilder
impl Unpin for CommandBuilder
impl UnwindSafe for CommandBuilder
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