pub struct CLI {
pub commandMap: HashMap<String, fn(Vec<String>)>,
}
Fields§
§commandMap: HashMap<String, fn(Vec<String>)>
Implementations§
Source§impl CLI
impl CLI
pub fn merge(&mut self, other: CLI, bis_functions: bool) -> &mut Self
pub fn addCommand( &mut self, commandName: String, commandAction: fn(Vec<String>), ) -> &mut Self
pub fn addCommands( &mut self, commandNames: Vec<String>, commandAction: fn(Vec<String>), ) -> &mut Self
pub fn hasCommand(&self, commandName: &str) -> bool
pub fn executeCommand( &self, commandName: String, args: Vec<String>, ) -> Result<(), String>
pub fn executeCommands( &self, commandNames: Vec<String>, args: Vec<String>, ) -> Result<(), String>
pub fn args_from_input(input: &String, delimiter: &char) -> Vec<String>
pub fn question_from_input(input: &String, delimiter: &char) -> String
pub fn run(&self, inputLoopQuestion: &str)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CLI
impl RefUnwindSafe for CLI
impl Send for CLI
impl Sync for CLI
impl Unpin for CLI
impl UnwindSafe for CLI
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