Struct r_core::r_cmd_desc_help_t [−][src]
#[repr(C)]pub struct r_cmd_desc_help_t {
pub summary: *const c_char,
pub description: *const c_char,
pub args_str: *const c_char,
pub usage: *const c_char,
pub options: *const c_char,
pub examples: *const RCmdDescExample,
}
Expand description
Define how the command looks like in the help.
Fields
summary: *const c_char
Short-sentence explaining what the command does. This is shown, for example, when the list of sub-commands is printed and each sub-command has a very short description on the right, explaining what it does.
description: *const c_char
Long description of what the command does. It can be as long as you
want and it should explain well how the command behaves.
This is shown, for example, when ??
is appended on command or ?
is appended and the command has no children to show. In that case,
the short summary is extended with this longer description.
Optional.
args_str: *const c_char
String used to identify the arguments. This usually comes together with the summary. TODO: explain how to differentiate between required and optional arguments
usage: *const c_char
String that overrides the name+args_str usually used to describe the command.
Optional.
options: *const c_char
String to use as sub-commands suggestions instead of the
auto-generated one (e.g. [abcd] or [?] that you can see near command
names when doing w?
). If not provided, the options will be
auto-generated.
Optional.
examples: *const RCmdDescExample
List of examples used to better explain how to use the command. This is shown together with the long description.
Optional.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for r_cmd_desc_help_t
impl !Send for r_cmd_desc_help_t
impl !Sync for r_cmd_desc_help_t
impl Unpin for r_cmd_desc_help_t
impl UnwindSafe for r_cmd_desc_help_t
Blanket Implementations
Mutably borrows from an owned value. Read more