Struct ckb_app_config::Setup
source · pub struct Setup {
pub subcommand_name: String,
pub config: AppConfig,
}
Expand description
A struct including all the information to start the ckb process.
Fields§
§subcommand_name: String
Subcommand name.
For example, this is set to run
when ckb is executed with ckb run
.
config: AppConfig
The config file for the current subcommand.
Implementations§
source§impl Setup
impl Setup
sourcepub fn from_matches(
bin_name: String,
subcommand_name: &str,
matches: &ArgMatches
) -> Result<Setup, ExitCode>
pub fn from_matches( bin_name: String, subcommand_name: &str, matches: &ArgMatches ) -> Result<Setup, ExitCode>
Boots the ckb process by parsing the command line arguments and loading the config file.
sourcepub fn migrate(self, matches: &ArgMatches) -> Result<MigrateArgs, ExitCode>
pub fn migrate(self, matches: &ArgMatches) -> Result<MigrateArgs, ExitCode>
migrate
subcommand has one flags
arg, trigger this arg with “–check”
sourcepub fn replay(self, matches: &ArgMatches) -> Result<ReplayArgs, ExitCode>
pub fn replay(self, matches: &ArgMatches) -> Result<ReplayArgs, ExitCode>
Executes ckb replay
.
sourcepub fn import(self, matches: &ArgMatches) -> Result<ImportArgs, ExitCode>
pub fn import(self, matches: &ArgMatches) -> Result<ImportArgs, ExitCode>
Executes ckb import
.
sourcepub fn export(self, matches: &ArgMatches) -> Result<ExportArgs, ExitCode>
pub fn export(self, matches: &ArgMatches) -> Result<ExportArgs, ExitCode>
Executes ckb export
.
sourcepub fn daemon(self, matches: &ArgMatches) -> Result<DaemonArgs, ExitCode>
pub fn daemon(self, matches: &ArgMatches) -> Result<DaemonArgs, ExitCode>
Executes ckb daemon
.
sourcepub fn reset_data(self, matches: &ArgMatches) -> Result<ResetDataArgs, ExitCode>
pub fn reset_data(self, matches: &ArgMatches) -> Result<ResetDataArgs, ExitCode>
Executes ckb reset-data
.
sourcepub fn root_dir_from_matches(matches: &ArgMatches) -> Result<PathBuf, ExitCode>
pub fn root_dir_from_matches(matches: &ArgMatches) -> Result<PathBuf, ExitCode>
Resolves the root directory for ckb from the command line arguments.
sourcepub fn daemon_pid_file_path(matches: &ArgMatches) -> Result<PathBuf, ExitCode>
pub fn daemon_pid_file_path(matches: &ArgMatches) -> Result<PathBuf, ExitCode>
Resolves the pid file path for ckb from the command line arguments.
sourcepub fn peer_id(matches: &ArgMatches) -> Result<PeerIDArgs, ExitCode>
pub fn peer_id(matches: &ArgMatches) -> Result<PeerIDArgs, ExitCode>
Gets the network peer id by reading the network secret key.
Auto Trait Implementations§
impl RefUnwindSafe for Setup
impl Send for Setup
impl Sync for Setup
impl Unpin for Setup
impl UnwindSafe for Setup
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more