referrerpolicy=no-referrer-when-downgrade

Trait polkadot_service::IdentifyVariant

source ·
pub trait IdentifyVariant {
    // Required methods
    fn is_polkadot(&self) -> bool;
    fn is_kusama(&self) -> bool;
    fn is_westend(&self) -> bool;
    fn is_rococo(&self) -> bool;
    fn is_versi(&self) -> bool;
    fn is_dev(&self) -> bool;
    fn identify_chain(&self) -> Chain;
}
Expand description

Can be called for a Configuration to identify which network the configuration targets.

Required Methods§

source

fn is_polkadot(&self) -> bool

Returns if this is a configuration for the Polkadot network.

source

fn is_kusama(&self) -> bool

Returns if this is a configuration for the Kusama network.

source

fn is_westend(&self) -> bool

Returns if this is a configuration for the Westend network.

source

fn is_rococo(&self) -> bool

Returns if this is a configuration for the Rococo network.

source

fn is_versi(&self) -> bool

Returns if this is a configuration for the Versi test network.

source

fn is_dev(&self) -> bool

Returns true if this configuration is for a development network.

source

fn identify_chain(&self) -> Chain

Identifies the variant of the chain.

Implementations on Foreign Types§

source§

impl IdentifyVariant for Box<dyn ChainSpec>

Implementors§