Trait ExplorerHeader

Source
pub trait ExplorerHeader<Types: NodeType>: QueryableHeader<Types>
where Header<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<NamespaceId<Types>> ; }
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§

Source

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.

Source

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.

Source

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§

Source

fn proposer_id(&self) -> Self::ProposerId

The proposer id of the block as stored within the block header.

Source

fn fee_info_account(&self) -> Self::WalletAddress

The wallet address of the fee info account contained within the block header.

Source

fn fee_info_balance(&self) -> Self::BalanceAmount

The balance amount of the fee info contained within the block header.

Source

fn reward_balance(&self) -> Self::BalanceAmount

The balance amount of the reward for constructing the block.

Source

fn namespace_ids(&self) -> Vec<NamespaceId<Types>>

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.

Implementors§