pub struct ChainspecConfig { /* private fields */ }
Expand description
This struct can be parsed from a TOML-encoded chainspec file. It means that as the
chainspec format changes over versions, as long as we maintain the core config in this form
in the chainspec file, it can continue to be parsed as an ChainspecConfig
.
Implementations§
source§impl ChainspecConfig
impl ChainspecConfig
sourcepub fn from_chainspec_path<P: AsRef<Path>>(filename: P) -> Result<Self, Error>
pub fn from_chainspec_path<P: AsRef<Path>>(filename: P) -> Result<Self, Error>
Returns a new ChainspecConfig
parsed from the TOML-encoded chainspec file at filename
.
sourcepub fn create_genesis_request_from_production_chainspec(
genesis_accounts: Vec<GenesisAccount>,
protocol_version: ProtocolVersion
) -> Result<RunGenesisRequest, Error>
pub fn create_genesis_request_from_production_chainspec( genesis_accounts: Vec<GenesisAccount>, protocol_version: ProtocolVersion ) -> Result<RunGenesisRequest, Error>
Create a RunGenesisRequest
using values from the production chainspec.toml
.
sourcepub fn max_associated_keys(&self) -> u32
pub fn max_associated_keys(&self) -> u32
Returns the max_associated_keys
setting from the core config.
Trait Implementations§
source§impl Clone for ChainspecConfig
impl Clone for ChainspecConfig
source§fn clone(&self) -> ChainspecConfig
fn clone(&self) -> ChainspecConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'de> Deserialize<'de> for ChainspecConfig
impl<'de> Deserialize<'de> for ChainspecConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ChainspecConfig> for EngineConfig
impl From<ChainspecConfig> for EngineConfig
source§fn from(chainspec_config: ChainspecConfig) -> Self
fn from(chainspec_config: ChainspecConfig) -> Self
Converts to this type from the input type.
source§impl TryFrom<ChainspecConfig> for ExecConfig
impl TryFrom<ChainspecConfig> for ExecConfig
Auto Trait Implementations§
impl RefUnwindSafe for ChainspecConfig
impl Send for ChainspecConfig
impl Sync for ChainspecConfig
impl Unpin for ChainspecConfig
impl UnwindSafe for ChainspecConfig
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.