[][src]Struct tari_common::configuration::bootstrap::ConfigBootstrap

pub struct ConfigBootstrap {
    pub base_path: PathBuf,
    pub config: PathBuf,
    pub log_config: PathBuf,
    pub init: bool,
    pub create_id: bool,
    pub daemon_mode: bool,
    pub rebuild_db: bool,
    pub input_file: Option<PathBuf>,
    pub command: Option<String>,
    pub clean_orphans_db: bool,
    pub enable_mining: bool,
    pub password: Option<String>,
    pub change_password: bool,
    pub recovery: bool,
}

Fields

base_path: PathBuf

A path to a directory to store your files

config: PathBuf

A path to the configuration file to use (config.toml)

log_config: PathBuf

The path to the log configuration file. It is set using the following precedence set

init: bool

Create a default configuration file if it doesn't exist

create_id: bool

Create and save new node identity if one doesn't exist

daemon_mode: bool

Run in daemon mode, with no interface

rebuild_db: bool

This will rebuild the db, adding block for block in

input_file: Option<PathBuf>

Path to input file of commands

command: Option<String>

Single input command

clean_orphans_db: bool

This will clean out the orphans db at startup

enable_mining: bool

Enable Mining

password: Option<String>

Supply the password for the console wallet

change_password: bool

Change the password for the console wallet

recovery: bool

Force wallet recovery

Implementations

impl ConfigBootstrap[src]

pub fn init_dirs(
    &mut self,
    application_type: ApplicationType
) -> Result<(), ConfigError>
[src]

Initialize configuration and directories based on ConfigBootstrap options.

If not present it will create base directory (default ~/.tari/, depending on OS). Log and tari configs will be initialized in the base directory too.

Without --init flag provided configuration and directories will be created only after user's confirmation.

pub fn initialize_logging(&self) -> Result<(), ConfigError>[src]

Set up application-level logging using the Log4rs configuration file based on supplied CLI arguments

pub fn load_configuration(&self) -> Result<Config, ConfigError>[src]

Load configuration from files located based on supplied CLI arguments

Trait Implementations

impl Debug for ConfigBootstrap[src]

impl Default for ConfigBootstrap[src]

impl StructOpt for ConfigBootstrap[src]

impl StructOptInternal for ConfigBootstrap[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any

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