pub struct CmdDoc {
pub caller: Arc<str>,
pub short: Option<Arc<Text>>,
pub long: Option<Arc<Text>>,
pub params: Arc<[ParamDoc]>,
}Expand description
The description for a Duat command, which can be executed in
the PromptLine
Fields§
§caller: Arc<str>The caller for the command
short: Option<Arc<Text>>“Short” documentation for a command
This should be a short line of few words, meant for possibly being displayed in a list.
Note that this is not a short version of
CmdDoc::long. So they shouldn’t present the same
information.
long: Option<Arc<Text>>“Long” documentation for a command
This should add more details to the Text of
CmdDoc::short. This description is meant to be shown
when more information is required on top of
CmdDoc::short, so they shouldn’t present the same
information.
Note also that you can add documentation about the
parameters, however, you should prioritize calling
CmdBuilder::doc_param for that purpose instead.
params: Arc<[ParamDoc]>Documentation about the command’s parameters