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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.