Trait ExplorerHeader
pub trait ExplorerHeader<Types>: QueryableHeader<Types>{
type BalanceAmount: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + PartialEq + Eq;
type WalletAddress: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + PartialEq + Eq;
type ProposerId: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + PartialEq + Eq;
// Required methods
fn proposer_id(&self) -> Self::ProposerId;
fn fee_info_account(&self) -> Self::WalletAddress;
fn fee_info_balance(&self) -> Self::BalanceAmount;
fn reward_balance(&self) -> Self::BalanceAmount;
fn namespace_ids(
&self,
) -> Vec<<<Types as NodeType>::BlockHeader as QueryableHeader<Types>>::NamespaceId>;
}Expand description
ExplorerHeader is a trait that represents certain extensions to the [BlockHeader] that are specific to the Block Explorer API. This trait allows for the explorer module to be defined and provide an API for any consuming Block Explorer.
Required Associated Types§
type BalanceAmount: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + PartialEq + Eq
type BalanceAmount: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + PartialEq + Eq
BalanceAmount is a type that represents a general balance amount. It does not indicate how this balance is represented, just that there is a representation of it that adheres to the trait restrictions specified.
type WalletAddress: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + PartialEq + Eq
type WalletAddress: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + PartialEq + Eq
WalletAddress is a type that represents the address of a Wallet. It does not indicate how this address is represented, just that there is a representation of it that adheres to the trait restrictions specified.
type ProposerId: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + PartialEq + Eq
type ProposerId: Clone + Debug + Serialize + DeserializeOwned + Send + Sync + PartialEq + Eq
ProposerId is a type that represents the proposer id of the block. It does not indicate how this proposer id is represented, just that there is a representation of it that adheres to the trait restrictions specified.
Required Methods§
fn proposer_id(&self) -> Self::ProposerId
fn proposer_id(&self) -> Self::ProposerId
The proposer id of the block as stored within the block header.
fn fee_info_account(&self) -> Self::WalletAddress
fn fee_info_account(&self) -> Self::WalletAddress
The wallet address of the fee info account contained within the block header.
fn fee_info_balance(&self) -> Self::BalanceAmount
fn fee_info_balance(&self) -> Self::BalanceAmount
The balance amount of the fee info contained within the block header.
fn reward_balance(&self) -> Self::BalanceAmount
fn reward_balance(&self) -> Self::BalanceAmount
The balance amount of the reward for constructing the block.
fn namespace_ids(
&self,
) -> Vec<<<Types as NodeType>::BlockHeader as QueryableHeader<Types>>::NamespaceId>
fn namespace_ids( &self, ) -> Vec<<<Types as NodeType>::BlockHeader as QueryableHeader<Types>>::NamespaceId>
A collection of namespace ids that are contained within the block header.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.