pub struct Bundle(pub Context, pub Command);
Expand description

New-type for help processing in action. Inner is simple tuple - (Context,Command)

Tuple Fields

0: Context1: Command

Implementations

Creates new instance of bundle.

Returns inner tuple (Context,Command)

Returns ref of Context

Returns ref of Command

Returns mut ref of Context

Returns mut ref of Command

Get exe_path as &str

Takes flag value from context. Different from get, returns flag_value instance own (not reference) that has context. contextからフラグ値を取得する。Getとは違い、参照ではなくcontextに格納されているもの(格納されていない場合はデフォルト値のコピー)そのものを返す

Takes inputted flag value from context. Different from get, returns flag_value instance own (not reference) that has context. contextからフラグ値を(ユーザによりargに指定(入力)されている場合)取得する。Getとは違い、参照ではなくcontextに格納されているもの(格納されていない場合はNoneを)そのものを返す

Takes flag value from context. Different from get, returns flag_value instance own (not reference) that has context. contextからローカルフラグの値を取得する。Getとは違い、参照ではなくcontextに格納されているもの(格納されていない場合はデフォルト値のコピー)そのものを返す

Takes inputted flag value from context. Different from get, returns flag_value instance own (not reference) that has context. contextからコモンフラグの値を取得する。Getとは違い、参照ではなくcontextに格納されているもの(格納されていない場合はデフォルト値のコピー)そのものを返す

Takes inputted local flag value from context. Different from get, returns flag_value instance own (not reference) that has context. contextからローカルフラグ値を(ユーザによりargに指定(入力)されている場合)取得する。Getとは違い、参照ではなくcontextに格納されているものそのもの(格納されていない場合はNone)を返す

Takes inputted local flag value from context. Different from get, returns flag_value instance own (not reference) that has context. contextからコモンフラグ値を(ユーザによりargに指定(入力)されている場合)取得する。Getとは違い、参照ではなくcontextに格納されているものそのもの(格納されていない場合はNone)を返す

Gets FlagValue’s clone of the flag matches flag_name from context. contextからフラグ値のcloneを取得する。フラグが設定されていない場合はNoneを返す なお明示的に値が指定されない場合、Bool型のフラグであればFlagValue::Bool(true)とし、String型のフラグであればFlagValue::String(String::new())、それ以外の型のフラグではFlagValue::NoneをSomeで包んで返す

Gets FlagValue’s clone of the inputted flag matches flag_name from context. contextからユーザから指定された場合のフラグ値のcloneを取得する。ユーザから入力されていない場合はNoneを返す。

Gets FlagValue’s clone of the common flag matches flag_name from context. If it is not defined, Returns None. contextからユーザから指定された場合のローカルフラグ値のcloneを取得する。ユーザから入力されていないが定義されている場合はデフォルト値のクローンを返す。定義もされていない場合はNoneを返す。 なお明示的に値が指定されない場合、Bool型のフラグであればFlagValue::Bool(true)とし、String型のフラグであればFlagValue::String(String::new())、それ以外の型のフラグではFlagValue::NoneをSomeで包んで返す

Gets the flag value of the local flag matches flag_name if inputted. If it is not defined or not inputted, returns None. flag_nameとnameが一致するローカルフラグがあり、それがユーザからコマンド引数で指定されていた場合、その値のクローンをSomeで包んで返す。flag_nameと一致するnameをどのローカルフラグも持たないか、ユーザがコマンド引数で指定していない場合はNoneを返す。

Gets the flag value of the common flag whose name matches flag_name. If it is not defined or not inputted, returns None. flag_nameとnameが一致するコモンフラグがあり、それがユーザからコマンド引数で指定されていた場合、その値のクローンをSomeで包んで返す。flag_nameと一致するnameをどのコモンフラグも持たないか、ユーザがコマンド引数で指定していない場合はNoneを返す。

Returns true the value of the flag which has specified name is true.

Returns depth of command - root:0

Trait Implementations

Converts to this type from the input type.

Converts to this type from the input type.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.