Expand description

combu is a customizable cli framework crate. The library name “combu” comes from command + 昆布(konbu, it means kelp in japanese).

combu has no dependencies(or depends on only std library). Crate.io’s page is here.

To know more about this crate, please read README(You can read file OR Github) first.

combu(com + 昆布)は柔軟に CLI を組み上げられることを目標とした、カスタマイズ可能な CLI フレームワークです(一時クレートの名前が cmb だったこともありましたが、現在は combu です)。

もう少し詳しく知りたい場合、まず初めにREADME(ファイルはこちら、Githubのページはこちら)をお読みください。

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 macro.
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.
Macro for parse error check
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.
List check macro
create cmd helper with full detail
alias of commands! macro
create command array
Macro for creating copyright
Macro for preset copyright flag.
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.
Print preset help shortcut
Preset for help request to parent command
Preset of help command
Macro for preset root.
alias of Ok(ActionResult::Result(cmd, ctx))
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にたどり着くまでの情報およびパース結果を格納する構造体。 フラグの値、たどってきたルートなどを保管しています。