pub enum ChainState {
Ethereum(EthereumState),
Cosmos(CosmosState),
}Expand description
Chain-specific state variants
Variants§
Implementations§
Source§impl ChainState
impl ChainState
Sourcepub fn chain_type(&self) -> ChainType
pub fn chain_type(&self) -> ChainType
Get the chain type for this state
Sourcepub fn as_ethereum(&self) -> Option<&EthereumState>
pub fn as_ethereum(&self) -> Option<&EthereumState>
Get the Ethereum state if this is an Ethereum validator
Sourcepub fn as_ethereum_mut(&mut self) -> Option<&mut EthereumState>
pub fn as_ethereum_mut(&mut self) -> Option<&mut EthereumState>
Get the Ethereum state mutably if this is an Ethereum validator
Sourcepub fn as_cosmos(&self) -> Option<&CosmosState>
pub fn as_cosmos(&self) -> Option<&CosmosState>
Get the Cosmos state if this is a Cosmos validator
Sourcepub fn as_cosmos_mut(&mut self) -> Option<&mut CosmosState>
pub fn as_cosmos_mut(&mut self) -> Option<&mut CosmosState>
Get the Cosmos state mutably if this is a Cosmos validator
Trait Implementations§
Source§impl Clone for ChainState
impl Clone for ChainState
Source§fn clone(&self) -> ChainState
fn clone(&self) -> ChainState
Returns a duplicate 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 ChainState
impl Debug for ChainState
Source§impl<'de> Deserialize<'de> for ChainState
impl<'de> Deserialize<'de> for ChainState
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
Auto Trait Implementations§
impl Freeze for ChainState
impl RefUnwindSafe for ChainState
impl Send for ChainState
impl Sync for ChainState
impl Unpin for ChainState
impl UnwindSafe for ChainState
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