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>,
pub routine: Routine,
}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()
.kind( Type::String )
.end()
.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.
routine: RoutineThe type Routine represents the specific implementation of the routine.
Implementations§
source§impl Command
impl Command
sourcepub fn former() -> CommandFormer<Command, ReturnContainer>
pub fn former() -> CommandFormer<Command, ReturnContainer>
Make former, variation of builder pattern to form structure defining values of fields step by step.
Trait Implementations§
source§impl PartialEq for Command
impl PartialEq for Command
impl Eq for Command
impl StructuralPartialEq for Command
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
source§impl<S> SetWithType for S
impl<S> SetWithType for S
source§fn set_with_type<T, IntoT>(&mut self, component: IntoT)where
IntoT: Into<T>,
S: SetComponent<T, IntoT>,
fn set_with_type<T, IntoT>(&mut self, component: IntoT)where
IntoT: Into<T>,
S: SetComponent<T, IntoT>,
Function to set value of a component by its type.