pub struct Command {
pub cmd: Vec<CommandType>,
pub desc: String,
pub func: &'static dyn Fn(&mut State<'_>) -> bool,
}
Expand description
Command definition
Fields§
§cmd: Vec<CommandType>
When any of the values matched with input from user, command will be executed.
desc: String
Description of the command, can be seen in help text.
func: &'static dyn Fn(&mut State<'_>) -> bool
The function that runs when command executed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl !RefUnwindSafe for Command
impl !Send for Command
impl !Sync for Command
impl Unpin for Command
impl !UnwindSafe for Command
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