pub struct CommandDecl {
pub name: String,
pub kind: CommandKind,
pub args: Vec<Ty>,
pub ret: Ty,
pub params: Vec<Option<String>>,
pub aliases: Vec<String>,
pub doc: Option<String>,
pub package: Option<String>,
pub defaults: Vec<Option<Value>>,
}Expand description
The declaration of a command (of any kind; for tools and declaration files; Registry::commands).
Fields§
§name: StringThe name (package.command).
kind: CommandKindKind.
args: Vec<Ty>Parameter types.
ret: TyThe return type (() if none).
params: Vec<Option<String>>Parameter names (only those given at registration).
aliases: Vec<String>Old names (aliases), in name order.
doc: Option<String>A description.
package: Option<String>The package that provides the command.
defaults: Vec<Option<Value>>Default values of parameters (as many as the parameters).
Trait Implementations§
Source§impl Clone for CommandDecl
impl Clone for CommandDecl
Source§impl Debug for CommandDecl
impl Debug for CommandDecl
Source§impl PartialEq for CommandDecl
impl PartialEq for CommandDecl
impl StructuralPartialEq for CommandDecl
Auto Trait Implementations§
impl Forget for CommandDecl
impl Freeze for CommandDecl
impl Move for CommandDecl
impl RefUnwindSafe for CommandDecl
impl Send for CommandDecl
impl Sync for CommandDecl
impl Unpin for CommandDecl
impl UnsafeUnpin for CommandDecl
impl UnwindSafe for CommandDecl
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