pub struct ArgsManager {
    pub cs_args: Arc<Mutex<ArgsManagerInner>>,
}

Fields§

§cs_args: Arc<Mutex<ArgsManagerInner>>

Implementations§

source§

impl ArgsManager

source

pub fn add_command(&mut self, cmd: &str, help: &str)

source

pub fn add_arg(&mut self, x: &ArgDescriptor)

source

pub fn add_hidden_args(&mut self, names: &Vec<&'static str>)

source

pub fn setup_cli_args(&mut self)

source

pub fn setup_chain_params_base_options(&mut self)

source

pub fn clear_args(&mut self)

source

pub fn clear_path_cache(&mut self)

source

pub fn get_arg_flags(&self, name: &str) -> Option<u32>

source

pub fn get_args(&self, str_arg: &str) -> Vec<String>

source

pub fn get_arg(&self, str_arg: &str, str_default: &str) -> String

source

pub fn get_int_arg(&self, str_arg: &str, n_default: i64) -> i64

source

pub fn get_bool_arg(&self, str_arg: &str, default: bool) -> bool

source

pub fn get_blocks_dir_path(&self) -> Box<Path>

source

pub fn get_chain_name(&mut self) -> Result<String, StdException>

source

pub fn get_command(&self) -> Option<ArgsManagerCommand>

source

pub fn get_data_dir_base(&self) -> PathBuf

source

pub fn get_data_dir_net(&self) -> PathBuf

source

pub fn get_data_dir(&self, net_specific: bool) -> PathBuf

source

pub fn get_help_message(&self) -> String

source

pub fn get_settings_path( &self, filepath: Option<&mut Box<Path>>, temp: Option<bool> ) -> bool

source

pub fn get_setting(&self, arg: &str) -> SettingsValue

source

pub fn get_settings_list(&self, arg: &str) -> Vec<SettingsValue>

source

pub fn get_unrecognized_sections(&self) -> LinkedList<SectionInfo>

source

pub fn help_requested(&self) -> bool

source

pub fn setup_help_options(&mut self)

source

pub fn log_args_prefix( &self, prefix: &str, section: &str, args: &HashMap<String, Vec<SettingsValue>> )

source

pub fn log_args(&self)

source

pub fn parse_parameters( &mut self, argv: &Vec<String>, error: &mut String ) -> bool

source

pub fn is_arg_set(&self, str_arg: &str) -> bool

source

pub fn is_arg_negated(&self, str_arg: &str) -> bool

source

pub fn read_config_stream<R: Read>( &mut self, stream: &mut BufReader<R>, filepath: &str, error: &mut String, ignore_invalid_keys: Option<bool> ) -> bool

source

pub fn read_config_files( &mut self, error: &mut String, ignore_invalid_keys: Option<bool> ) -> bool

source

pub fn select_config_network(&mut self, network: &str)

source

pub fn soft_set_arg(&mut self, str_arg: &str, str_value: &str) -> bool

source

pub fn force_set_arg(&mut self, str_arg: &str, str_value: &str)

source

pub fn soft_set_bool_arg(&mut self, str_arg: &str, value: bool) -> bool

source

pub fn init_settings(&mut self, error: &mut String) -> Result<(), String>

source

pub fn read_settings_file(&mut self, errors: Option<&mut Vec<String>>) -> bool

source

pub fn write_settings_file( &self, errors: Option<&mut Vec<String>> ) -> Result<bool, StdException>

source

pub fn use_default_section(&self, arg: &str) -> bool

source§

impl ArgsManager

source

pub fn get_unsuitable_section_only_args(&self) -> HashSet<String>

| Log warnings for options in m_section_only_args | when they are specified in the default | section but not overridden on the command | line or in a network-specific section | in the config file. |

Trait Implementations§

source§

impl Default for ArgsManager

source§

fn default() -> ArgsManager

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,

§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> StaticUpcast<T> for T

§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V