pub struct Command {
pub hint: String,
pub long_hint: String,
pub phrase: String,
pub subjects: Vec<ValueDescription>,
pub properties: HashMap<String, ValueDescription>,
pub properties_aliases: HashMap<String, String>,
}Expand description
Command descriptor.
Based on this structure, the structure( ParsedCommand ) obtained after parsing will be validated and converted to VerifiedCommand.
§Example:
let command = Command::former()
.hint( "hint" )
.long_hint( "long_hint" )
.phrase( "command" )
.subject( "subject", Type::String, false )
.form();Fields§
§hint: StringCommand common hint.
long_hint: StringCommand full hint.
phrase: StringPhrase descriptor for command.
subjects: Vec<ValueDescription>Command subjects hints and types.
properties: HashMap<String, ValueDescription>Hints and types for command options.
properties_aliases: HashMap<String, String>Map of aliases.
Implementations§
Trait Implementations§
source§impl PartialEq for Command
impl PartialEq for Command
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
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