Skip to main content

IdentifyVariant

Trait 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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IdentifyVariant for Box<dyn ChainSpec>

Implementors§