Expand description
New-type for help processing in action. Inner is simple tuple - (Context,Command)
Tuple Fields
0: Context
1: Command
Implementations
sourceimpl Bundle
impl Bundle
sourcepub fn context_mut(&mut self) -> &mut Context
pub fn context_mut(&mut self) -> &mut Context
Returns mut ref of Context
sourcepub fn command_mut(&mut self) -> &mut Command
pub fn command_mut(&mut self) -> &mut Command
Returns mut ref of Command
sourcepub fn take_flag_value_of(&mut self, flag_name: &str) -> Option<FlagValue>
pub fn take_flag_value_of(&mut self, flag_name: &str) -> Option<FlagValue>
Takes flag value from context. Different from get, returns flag_value instance own (not reference) that has context. contextからフラグ値を取得する。Getとは違い、参照ではなくcontextに格納されているもの(格納されていない場合はデフォルト値のコピー)そのものを返す
sourcepub fn take_inputted_flag_value_of(
&mut self,
flag_name: &str
) -> Option<FlagValue>
pub fn take_inputted_flag_value_of(
&mut self,
flag_name: &str
) -> Option<FlagValue>
Takes inputted flag value from context. Different from get, returns flag_value instance own (not reference) that has context. contextからフラグ値を(ユーザによりargに指定(入力)されている場合)取得する。Getとは違い、参照ではなくcontextに格納されているもの(格納されていない場合はNoneを)そのものを返す
sourcepub fn take_local_flag_value_of(&mut self, flag_name: &str) -> Option<FlagValue>
pub fn take_local_flag_value_of(&mut self, flag_name: &str) -> Option<FlagValue>
Takes flag value from context. Different from get, returns flag_value instance own (not reference) that has context. contextからローカルフラグの値を取得する。Getとは違い、参照ではなくcontextに格納されているもの(格納されていない場合はデフォルト値のコピー)そのものを返す
sourcepub fn take_common_flag_value_of(
&mut self,
flag_name: &str
) -> Option<FlagValue>
pub fn take_common_flag_value_of(
&mut self,
flag_name: &str
) -> Option<FlagValue>
Takes inputted flag value from context. Different from get, returns flag_value instance own (not reference) that has context. contextからコモンフラグの値を取得する。Getとは違い、参照ではなくcontextに格納されているもの(格納されていない場合はデフォルト値のコピー)そのものを返す
sourcepub fn take_inputted_local_flag_value_of(
&mut self,
flag_name: &str
) -> Option<FlagValue>
pub fn take_inputted_local_flag_value_of(
&mut self,
flag_name: &str
) -> Option<FlagValue>
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)を返す
sourcepub fn take_inputted_common_flag_value_of(
&mut self,
flag_name: &str
) -> Option<FlagValue>
pub fn take_inputted_common_flag_value_of(
&mut self,
flag_name: &str
) -> Option<FlagValue>
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)を返す
sourcepub fn get_flag_value_of(&self, flag_name: &str) -> Option<FlagValue>
pub fn get_flag_value_of(&self, flag_name: &str) -> Option<FlagValue>
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で包んで返す
sourcepub fn get_inputted_flag_value_of(&self, flag_name: &str) -> Option<FlagValue>
pub fn get_inputted_flag_value_of(&self, flag_name: &str) -> Option<FlagValue>
Gets FlagValue’s clone of the inputted flag matches flag_name from context. contextからユーザから指定された場合のフラグ値のcloneを取得する。ユーザから入力されていない場合はNoneを返す。
sourcepub fn get_local_flag_value_of(&self, flag_name: &str) -> Option<FlagValue>
pub fn get_local_flag_value_of(&self, flag_name: &str) -> Option<FlagValue>
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で包んで返す
sourcepub fn get_inputted_local_flag_value_of(
&self,
flag_name: &str
) -> Option<FlagValue>
pub fn get_inputted_local_flag_value_of(
&self,
flag_name: &str
) -> Option<FlagValue>
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を返す。
sourcepub fn get_inputted_common_flag_value_of(
&self,
flag_name: &str
) -> Option<FlagValue>
pub fn get_inputted_common_flag_value_of(
&self,
flag_name: &str
) -> Option<FlagValue>
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を返す。
sourcepub fn is_flag_true(&self, name: &str) -> bool
pub fn is_flag_true(&self, name: &str) -> bool
Returns true the value of the flag which has specified name is true.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Bundle
impl Send for Bundle
impl Sync for Bundle
impl Unpin for Bundle
impl UnwindSafe for Bundle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more