Struct easy_repl::command::Command [−][src]
pub struct Command<'a> { pub description: String, pub args_info: Vec<String>, pub handler: Box<Handler<'a>>, }
Expand description
Single command that can be called in the REPL.
Though it is possible to construct it by manually, it is not advised.
One should rather use the provided command!
macro which will generate
appropriate arguments validation and args_info based on passed specification.
Fields
description: String
Expand description
Command desctiption that will be displayed in the help message
args_info: Vec<String>
Expand description
Names and types of arguments to the command
handler: Box<Handler<'a>>
Expand description
Command handler which should validate arguments and perform command logic
Implementations
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Command<'a>
impl<'a> !Send for Command<'a>
impl<'a> !Sync for Command<'a>
impl<'a> Unpin for Command<'a>
impl<'a> !UnwindSafe for Command<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T