pub struct ArgsManagerInner {
    pub settings: Settings,
    pub command: Vec<String>,
    pub network: Option<String>,
    pub network_only_args: HashSet<String>,
    pub available_args: HashMap<OptionsCategory, HashMap<String, ArgsManagerArg>>,
    pub accept_any_command: bool,
    pub config_sections: LinkedList<SectionInfo>,
    pub cached_blocks_path: Option<Box<Path>>,
    pub cached_datadir_path: Option<Box<Path>>,
    pub cached_network_datadir_path: Option<Box<Path>>,
}

Fields§

§settings: Settings§command: Vec<String>§network: Option<String>§network_only_args: HashSet<String>§available_args: HashMap<OptionsCategory, HashMap<String, ArgsManagerArg>>§accept_any_command: bool§config_sections: LinkedList<SectionInfo>§cached_blocks_path: Option<Box<Path>>§cached_datadir_path: Option<Box<Path>>§cached_network_datadir_path: Option<Box<Path>>

Implementations§

| Add subcommand |

| Add argument |

| Add many hidden arguments |

| Set the arguments for chainparams |

| Clear available arguments |

| Clear cached directory paths |

| Return integer argument or default | value | | ———– | @param strArg | | Argument to get (e.g. “-foo”) | ––––– | @param nDefault | | (e.g. 1) | | ———– | @return | | command-line argument (0 if invalid | number) or default value |

| Return boolean argument or default | value | | ———– | @param strArg | | Argument to get (e.g. “-foo”) | ––––– | @param fDefault | | (true or false) | | ———– | @return | | command-line argument or default value |

| Get blocks directory path | | ———– | @return | | Blocks path which is network specific |

| Returns the appropriate chain name | from the program arguments. | | | ———– | @return | | CBaseChainParams::MAIN by default; | raises runtime error if an invalid combination | is given. |

| Get the command and command args (returns | std::nullopt if no command provided) |

| Get data directory path | | | ———– | @return | | Absolute path on success, otherwise | an empty path when a non-directory path | would be returned @post Returned directory | path is created unless it is empty |

| Get data directory path with appended | network identifier | | ———– | @return | | Absolute path on success, otherwise | an empty path when a non-directory path | would be returned @post Returned directory | path is created unless it is empty |

| Get data directory path | | ———– | @param net_specific | | Append network identifier to the returned | path | | ———– | @return | | Absolute path on success, otherwise | an empty path when a non-directory path | would be returned @post Returned directory | path is created unless it is empty |

| Get the help string |

| Get settings file path, or return false | if read-write settings were disabled | with -nosettings. |

| Get setting value. | | Result will be null if setting was unset, | true if “-setting” argument was passed | false if “-nosetting” argument was | passed, and a string if a “-setting=value” | argument was passed. |

| Get list of setting values. |

| Log warnings for unrecognized section | names in the config file. |

| @return | | true if help has been requested via a | command-line arg |

| Add help options to the args manager |

| Helper function for LogArgs(). |

| Log the config file options and the command | line arguments, useful for troubleshooting. |

| Return true if the given argument has | been manually set | | ———– | @param strArg | | Argument to get (e.g. “-foo”) | | ———– | @return | | true if the argument has been set |

| Return true if the argument was originally | passed as a negated option, i.e. -nofoo. | | ———– | @param strArg | | Argument to get (e.g. “-foo”) | | ———– | @return | | true if the argument was passed negated |

| Select the network in use |

| Access settings with lock held. |

| Read and update settings file with saved | settings. This needs to be called after | SelectParams() because the settings | file location is network-specific. |

| Read settings file. Push errors to vector, | or log them if null. |

| Write settings file. Push errors to | vector, or log them if null. |

| Set an argument if it doesn’t already | have a value | | ———– | @param strArg | | Argument to set (e.g. “-foo”) | ––––– | @param strValue | | Value (e.g. “1”) | | ———– | @return | | true if argument gets set, false if it | already had a value |

| Forces an arg setting. Called by | | SoftSetArg() if the arg hasn’t already | been set. Also called directly in testing. |

| Set a boolean argument if it doesn’t | already have a value | | ———– | @param strArg | | Argument to set (e.g. “-foo”) | ––––– | @param fValue | | Value (e.g. false) | | ———– | @return | | true if argument gets set, false if it | already had a value |

| Returns true if settings values from | the default section should be used, | depending on the current network and | whether the setting is network-specific. |

Trait Implementations§

Returns the “default value” for a type. 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. 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 alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Convert type of a const pointer. 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.