Struct sc_cli::PurgeChainCmd [−][src]
pub struct PurgeChainCmd { pub yes: bool, pub shared_params: SharedParams, pub database_params: DatabaseParams, }
The purge-chain
command used to remove the whole chain.
Fields
yes: bool
Skip interactive prompt by answering yes automatically.
shared_params: SharedParams
database_params: DatabaseParams
Implementations
impl PurgeChainCmd
[src][−]
Trait Implementations
impl CliConfiguration<()> for PurgeChainCmd
[src][+]
fn shared_params(&self) -> &SharedParams
[src][−]
Get the SharedParams for this object
fn database_params(&self) -> Option<&DatabaseParams>
[src][−]
Get the DatabaseParams for this object
fn import_params(&self) -> Option<&ImportParams>
[src][−]
Get the ImportParams for this object
fn pruning_params(&self) -> Option<&PruningParams>
[src][−]
Get the PruningParams for this object
fn keystore_params(&self) -> Option<&KeystoreParams>
[src][−]
Get the KeystoreParams for this object
fn network_params(&self) -> Option<&NetworkParams>
[src][−]
Get the NetworkParams for this object
fn offchain_worker_params(&self) -> Option<&OffchainWorkerParams>
[src][−]
Get a reference to OffchainWorkerParams
for this object.
fn node_key_params(&self) -> Option<&NodeKeyParams>
[src][−]
Get the NodeKeyParams for this object
fn base_path(&self) -> Result<Option<BasePath>>
[src][−]
Get the base path of the configuration (if any) Read more
fn is_dev(&self) -> Result<bool>
[src][−]
Returns true
if the node is for development or not Read more
fn role(&self, _is_dev: bool) -> Result<Role>
[src][−]
Gets the role Read more
fn transaction_pool(&self) -> Result<TransactionPoolOptions>
[src][−]
Get the transaction pool options Read more
fn network_config(
&self,
chain_spec: &Box<dyn ChainSpec>,
is_dev: bool,
net_config_dir: PathBuf,
client_id: &str,
node_name: &str,
node_key: NodeKeyConfig,
default_listen_port: u16
) -> Result<NetworkConfiguration>
[src][−]
&self,
chain_spec: &Box<dyn ChainSpec>,
is_dev: bool,
net_config_dir: PathBuf,
client_id: &str,
node_name: &str,
node_key: NodeKeyConfig,
default_listen_port: u16
) -> Result<NetworkConfiguration>
Get the network configuration Read more
fn keystore_config(
&self,
config_dir: &PathBuf
) -> Result<(Option<String>, KeystoreConfig)>
[src][−]
&self,
config_dir: &PathBuf
) -> Result<(Option<String>, KeystoreConfig)>
Get the keystore configuration. Read more
fn database_cache_size(&self) -> Result<Option<usize>>
[src][−]
Get the database cache size. Read more
fn database_transaction_storage(&self) -> Result<TransactionStorageMode>
[src][−]
Get the database transaction storage scheme.
fn database(&self) -> Result<Option<Database>>
[src][−]
Get the database backend variant. Read more
fn database_config(
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseConfig>
[src][−]
&self,
base_path: &PathBuf,
cache_size: usize,
database: Database
) -> Result<DatabaseConfig>
Get the database configuration object for the parameters provided
fn state_cache_size(&self) -> Result<usize>
[src][−]
Get the state cache size. Read more
fn state_cache_child_ratio(&self) -> Result<Option<usize>>
[src][−]
Get the state cache child ratio (if any). Read more
fn state_pruning(
&self,
unsafe_pruning: bool,
role: &Role
) -> Result<PruningMode>
[src][−]
&self,
unsafe_pruning: bool,
role: &Role
) -> Result<PruningMode>
Get the state pruning mode. Read more
fn keep_blocks(&self) -> Result<KeepBlocks>
[src][−]
Get the block pruning mode. Read more
fn chain_id(&self, is_dev: bool) -> Result<String>
[src][−]
Get the chain ID (string). Read more
fn node_name(&self) -> Result<String>
[src][−]
Get the name of the node. Read more
fn wasm_method(&self) -> Result<WasmExecutionMethod>
[src][−]
Get the WASM execution method. Read more
fn wasm_runtime_overrides(&self) -> Option<PathBuf>
[src][−]
Get the path where WASM overrides live. Read more
fn execution_strategies(
&self,
is_dev: bool,
is_validator: bool
) -> Result<ExecutionStrategies>
[src][−]
&self,
is_dev: bool,
is_validator: bool
) -> Result<ExecutionStrategies>
Get the execution strategies. Read more
fn rpc_http(&self, _default_listen_port: u16) -> Result<Option<SocketAddr>>
[src][−]
Get the RPC HTTP address (None
if disabled). Read more
fn rpc_ipc(&self) -> Result<Option<String>>
[src][−]
Get the RPC IPC path (None
if disabled). Read more
fn rpc_ws(&self, _default_listen_port: u16) -> Result<Option<SocketAddr>>
[src][−]
Get the RPC websocket address (None
if disabled). Read more
fn rpc_methods(&self) -> Result<RpcMethods>
[src][−]
Returns the RPC method set to expose. Read more
fn rpc_ws_max_connections(&self) -> Result<Option<usize>>
[src][−]
Get the RPC websockets maximum connections (None
if unlimited). Read more
fn rpc_cors(&self, _is_dev: bool) -> Result<Option<Vec<String>>>
[src][−]
Get the RPC cors (None
if disabled) Read more
fn prometheus_config(
&self,
_default_listen_port: u16
) -> Result<Option<PrometheusConfig>>
[src][−]
&self,
_default_listen_port: u16
) -> Result<Option<PrometheusConfig>>
Get the prometheus configuration (None
if disabled) Read more
fn telemetry_endpoints(
&self,
chain_spec: &Box<dyn ChainSpec>
) -> Result<Option<TelemetryEndpoints>>
[src][−]
&self,
chain_spec: &Box<dyn ChainSpec>
) -> Result<Option<TelemetryEndpoints>>
Get the telemetry endpoints (if any) Read more
fn telemetry_external_transport(&self) -> Result<Option<ExtTransport>>
[src][−]
Get the telemetry external transport Read more
fn default_heap_pages(&self) -> Result<Option<u64>>
[src][−]
Get the default value for heap pages Read more
fn offchain_worker(&self, role: &Role) -> Result<OffchainWorkerConfig>
[src][−]
Returns an offchain worker config wrapped in Ok(_)
Read more
fn force_authoring(&self) -> Result<bool>
[src][−]
Returns Ok(true)
if authoring should be forced Read more
fn disable_grandpa(&self) -> Result<bool>
[src][−]
Returns Ok(true)
if grandpa should be disabled Read more
fn dev_key_seed(&self, _is_dev: bool) -> Result<Option<String>>
[src][−]
Get the development key seed from the current object Read more
fn tracing_targets(&self) -> Result<Option<String>>
[src][−]
Get the tracing targets from the current object (if any) Read more
fn tracing_receiver(&self) -> Result<TracingReceiver>
[src][−]
Get the TracingReceiver value from the current object Read more
fn node_key(&self, net_config_dir: &PathBuf) -> Result<NodeKeyConfig>
[src][−]
Get the node key from the current object Read more
fn max_runtime_instances(&self) -> Result<Option<usize>>
[src][−]
Get maximum runtime instances Read more
fn announce_block(&self) -> Result<bool>
[src][−]
Activate or not the automatic announcing of blocks after import Read more
fn create_configuration<C: SubstrateCli>(
&self,
cli: &C,
task_executor: TaskExecutor,
telemetry_handle: Option<TelemetryHandle>
) -> Result<Configuration>
[src][−]
&self,
cli: &C,
task_executor: TaskExecutor,
telemetry_handle: Option<TelemetryHandle>
) -> Result<Configuration>
Create a Configuration object from the current object
fn log_filters(&self) -> Result<String>
[src][−]
Get the filters for the logging. Read more
fn is_log_filter_reloading_disabled(&self) -> Result<bool>
[src][−]
Is log reloading disabled (enabled by default)
fn disable_log_color(&self) -> Result<bool>
[src][−]
Should the log color output be disabled?
fn init<C: SubstrateCli>(&self) -> Result<TelemetryWorker>
[src][−]
Initialize substrate. This must be done only once per process. Read more
impl Debug for PurgeChainCmd
[src][+]
fn fmt(&self, f: &mut Formatter<'_>) -> Result
[src][−]
Formats the value using the given formatter. Read more
impl StructOpt for PurgeChainCmd
[src][+]
fn clap<'a, 'b>() -> App<'a, 'b>
[src][−]
Returns clap::App
corresponding to the struct.
fn from_clap(matches: &ArgMatches<'_>) -> Self
[src][−]
Builds the struct from clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic. Read more
pub fn from_args() -> Self
[src][−]
Builds the struct from the command line arguments (std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program. Read more
pub fn from_args_safe() -> Result<Self, Error>
[src][−]
Builds the struct from the command line arguments (std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you. Read more
pub fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src][−]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making.
Print the error message and quit the program in case of failure. Read more
pub fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
[src][−]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
Gets the struct from any iterator such as a Vec
of your making. Read more
impl StructOptInternal for PurgeChainCmd
[src][+]
fn augment_clap<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b>
[src]
fn is_subcommand() -> bool
[src]
pub fn from_subcommand(
_sub: (&'b str, Option<&'b ArgMatches<'a>>)
) -> Option<Self>
[src]
_sub: (&'b str, Option<&'b ArgMatches<'a>>)
) -> Option<Self>
Auto Trait Implementations
impl RefUnwindSafe for PurgeChainCmd
impl Send for PurgeChainCmd
impl Sync for PurgeChainCmd
impl Unpin for PurgeChainCmd
impl UnwindSafe for PurgeChainCmd
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
pub fn type_id(&self) -> TypeId
[src][−]
Gets the TypeId
of self
. Read more
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow(&self) -> &T
[src][−]
Immutably borrows from an owned value. Read more
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src][−]
Mutably borrows from an owned value. Read more
impl<T> CheckedConversion for T
[src][+]
pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src][−]
Self: TryFrom<T>,
Convert from a value of T
into an equivalent instance of Option<Self>
. Read more
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src][−]
Self: TryInto<T>,
Consume self to return Some
equivalent value of Option<T>
. Read more
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src][+]
impl<T> Instrument for T
[src][+]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src][−]
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn in_current_span(self) -> Instrumented<Self>
[src][−]
impl<T> Instrument for T
[src][+]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src][−]
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn in_current_span(self) -> Instrumented<Self>
[src][−]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src][+]
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
pub fn from_ref(outer: &Outer) -> &T
[src][−]
Get a reference to the inner from the outer.
pub fn from_mut(outer: &mut Outer) -> &mut T
[src][−]
Get a mutable reference to the inner from the outer.
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Pointable for T
[src][+]
pub const ALIGN: usize
[src][−][−]
The alignment of pointer.
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src][−]
Initializes a with the given initializer. Read more
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src][−]
Dereferences the given pointer. Read more
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src][−]
Mutably dereferences the given pointer. Read more
pub unsafe fn drop(ptr: usize)
[src][−]
Drops the object pointed to by the given pointer. Read more
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
[src][+]
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
[src][−]
Self: UniqueSaturatedFrom<T>,
Convert from a value of T
into an equivalent instance of Self
. Read more
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
[src][−]
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of T
. Read more
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src][−]
Performs the conversion.
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src][−]
Performs the conversion.
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src][+]
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
[src][−]
The counterpart to unchecked_from
.
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src][+]
T: Bounded,
S: TryInto<T>,
pub fn unique_saturated_into(self) -> T
[src][−]
Consume self to return an equivalent value of T
.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,
pub fn vzip(self) -> V
[src]
impl<T> WithSubscriber for T
[src][+]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src][−]
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
pub fn with_current_subscriber(self) -> WithDispatch<Self>
[src][−]
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more