Crate combu

source · []
Expand description

combu is crate for creating cli

Re-exports

pub use action::Action;
pub use action::ActionError;
pub use action::ActionResult;
pub use action::ActionResult::Done;
pub use action::ActionResult::ParentActionRequest;
pub use command::Command;
pub use flag::Flag;
pub use flag::FlagType;
pub use flag::FlagValue;
pub use parser::Parser;
pub use vector::Vector;

Modules

action is a module about Action

command is a module about command

flag is a module about flag

parser is a module about command args parser

Macros for combu export macros for combu combuのためのエクスポート用マクロ集

vector is a moudle about vector

Macros

Build helper for action

action_result type annotation

Returns alias for Command Construction

Macro for preset authors flag.

Returns char from ident

Checks context has specified flag.

Checks context has authors flag. If the context has author flag, show authors and exit.

Checks context has license flag. If the context has license flag, show authors and exit.

Checks context has help flag. If the context has help flag, return ShowHelpRequest.

Checks context has license flag. If the context has license flag, exec $license_func and return done.

Checks context has values of the preset flags.

Checks context has version flag. If the context has help flag, show version and exit.

create cmd helper with full detail

alias of commands! macro

create command array

Macro for creating copyright

Gets crate’s authors from cargo.toml.

Gets crate’s description from cargo.toml.

Gets license of crate from cargo.toml.

Gets license file path of crate from cargo.toml.

Gets crate name from cargo.toml.

Gets crate’s version from cargo.toml.

Build helper for action

Default description for presets.

Default name for preset flags

Default alias for preset flags

Creates default_flag_value

Default name for presets

Create usage

Default value for presets.

Default value for presets. (Alias)

Preset of definition of help command action

Preset for definition function that can use help request action

Simple Alias of Ok(Done)

Helps for creating flag.

Gets FlagType from keyword

Creates flag_value

Helps for creating flags.

preset of help command action

Macro for preset help flag.

Gets license information from cargo.toml.

create license helper

Macro for preset license flag.

long_alias_expander

Macro for preset no flag.

option_string_from macro

Wrap with option if argument is not None.

Preset for help request to parent command

Preset of help command

Macro for preset root.

Macro for convinience to create root command.

short_alias_expander

Creates function returns given string

string_from macro. based on Strong::from, but no arg can generate String::new()

stringifier(not stringify about literal)

get Default falue from type

Creates new Vector.

Creates new Vector.

Macro for specification of command version

Macro for preset version flag.

Macro for preset yes flag.

Structs

Storage information for command execution. This storage raw args, non-flag args, flag values, and etc. コマンドからrunを通ってactionにたどり着くまでの情報およびパース結果を格納する構造体。 フラグの値、たどってきたルートなどを保管。