pub struct ChainspecRegistry { /* private fields */ }
Expand description
The chainspec registry.
Implementations§
source§impl ChainspecRegistry
impl ChainspecRegistry
sourcepub fn new_with_genesis(
chainspec_file_bytes: &[u8],
genesis_accounts_file_bytes: &[u8]
) -> Self
pub fn new_with_genesis( chainspec_file_bytes: &[u8], genesis_accounts_file_bytes: &[u8] ) -> Self
Returns a ChainspecRegistry
constructed at genesis.
sourcepub fn new_with_optional_global_state(
chainspec_file_bytes: &[u8],
global_state_file_bytes: Option<&[u8]>
) -> Self
pub fn new_with_optional_global_state( chainspec_file_bytes: &[u8], global_state_file_bytes: Option<&[u8]> ) -> Self
Returns a ChainspecRegistry
constructed at node upgrade.
sourcepub fn chainspec_raw_hash(&self) -> &Digest
pub fn chainspec_raw_hash(&self) -> &Digest
Returns the hash of the raw bytes of the chainspec.toml file.
sourcepub fn genesis_accounts_raw_hash(&self) -> Option<&Digest>
pub fn genesis_accounts_raw_hash(&self) -> Option<&Digest>
Returns the hash of the raw bytes of the genesis accounts.toml file if it exists.
sourcepub fn global_state_raw_hash(&self) -> Option<&Digest>
pub fn global_state_raw_hash(&self) -> Option<&Digest>
Returns the hash of the raw bytes of the global_state.toml file if it exists.
Trait Implementations§
source§impl Clone for ChainspecRegistry
impl Clone for ChainspecRegistry
source§fn clone(&self) -> ChainspecRegistry
fn clone(&self) -> ChainspecRegistry
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 Debug for ChainspecRegistry
impl Debug for ChainspecRegistry
source§impl<'de> Deserialize<'de> for ChainspecRegistry
impl<'de> Deserialize<'de> for ChainspecRegistry
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 FromBytes for ChainspecRegistry
impl FromBytes for ChainspecRegistry
source§impl Hash for ChainspecRegistry
impl Hash for ChainspecRegistry
source§impl Ord for ChainspecRegistry
impl Ord for ChainspecRegistry
source§fn cmp(&self, other: &ChainspecRegistry) -> Ordering
fn cmp(&self, other: &ChainspecRegistry) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ChainspecRegistry
impl PartialEq for ChainspecRegistry
source§fn eq(&self, other: &ChainspecRegistry) -> bool
fn eq(&self, other: &ChainspecRegistry) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ChainspecRegistry
impl PartialOrd for ChainspecRegistry
source§fn partial_cmp(&self, other: &ChainspecRegistry) -> Option<Ordering>
fn partial_cmp(&self, other: &ChainspecRegistry) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ChainspecRegistry
impl Serialize for ChainspecRegistry
source§impl ToBytes for ChainspecRegistry
impl ToBytes for ChainspecRegistry
source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Returns the length of the
Vec<u8>
which would be returned from a successful call to
to_bytes()
or into_bytes()
. The data is not actually serialized, so this call is
relatively cheap.impl Eq for ChainspecRegistry
impl StructuralPartialEq for ChainspecRegistry
Auto Trait Implementations§
impl RefUnwindSafe for ChainspecRegistry
impl Send for ChainspecRegistry
impl Sync for ChainspecRegistry
impl Unpin for ChainspecRegistry
impl UnwindSafe for ChainspecRegistry
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.