Trait reth_cli::chainspec::ChainSpecParser
source · pub trait ChainSpecParser:
Clone
+ Send
+ Sync
+ 'static {
type ChainSpec: Debug + Send + Sync;
const SUPPORTED_CHAINS: &'static [&'static str];
// Required method
fn parse(s: &str) -> Result<Arc<Self::ChainSpec>>;
// Provided methods
fn parser() -> impl TypedValueParser<Value = Arc<Self::ChainSpec>> { ... }
fn help_message() -> String { ... }
}
Expand description
Trait for parsing chain specifications.
This trait extends [clap::builder::TypedValueParser
] to provide a parser for chain
specifications. Implementers of this trait must provide a list of supported chains and a
function to parse a given string into a chain spec.
Required Associated Constants§
sourceconst SUPPORTED_CHAINS: &'static [&'static str]
const SUPPORTED_CHAINS: &'static [&'static str]
List of supported chains.
Required Associated Types§
Required Methods§
Provided Methods§
sourcefn parser() -> impl TypedValueParser<Value = Arc<Self::ChainSpec>>
fn parser() -> impl TypedValueParser<Value = Arc<Self::ChainSpec>>
Produces a [TypedValueParser
] for this chain spec parser.
sourcefn help_message() -> String
fn help_message() -> String
Produces a help message for the chain spec argument.
Object Safety§
This trait is not object safe.