pub trait PosRpcServer:
Sized
+ Send
+ Sync
+ 'static {
Show 15 methods
// Required methods
fn pos_status(&self) -> RpcResult<Status>;
fn pos_account(
&self,
address: H256,
view: Option<U64>,
) -> RpcResult<Account>;
fn pos_account_by_pow_address(
&self,
address: RpcAddress,
view: Option<U64>,
) -> RpcResult<Account>;
fn pos_committee(&self, view: Option<U64>) -> RpcResult<CommitteeState>;
fn pos_block_by_hash(&self, hash: H256) -> RpcResult<Option<Block>>;
fn pos_block_by_number(
&self,
number: BlockNumber,
) -> RpcResult<Option<Block>>;
fn pos_transaction_by_number(
&self,
number: U64,
) -> RpcResult<Option<Transaction>>;
fn pos_consensus_blocks(&self) -> RpcResult<Vec<Block>>;
fn pos_get_epoch_state(&self, epoch: U64) -> RpcResult<Option<EpochState>>;
fn pos_get_ledger_info_by_epoch(
&self,
epoch: U64,
) -> RpcResult<Option<LedgerInfoWithSignatures>>;
fn pos_get_ledger_info_by_block_number(
&self,
number: BlockNumber,
) -> RpcResult<Option<LedgerInfoWithSignatures>>;
fn pos_get_ledger_info_by_epoch_and_round(
&self,
epoch: U64,
round: U64,
) -> RpcResult<Option<LedgerInfoWithSignatures>>;
fn pos_get_ledger_infos_by_epoch(
&self,
start_epoch: U64,
end_epoch: U64,
) -> RpcResult<Vec<LedgerInfoWithSignatures>>;
fn pos_get_rewards_by_epoch(
&self,
epoch: U64,
) -> RpcResult<Option<PoSEpochReward>>;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}Expand description
Server trait implementation for the PosRpc RPC API.
Required Methods§
fn pos_status(&self) -> RpcResult<Status>
fn pos_account(&self, address: H256, view: Option<U64>) -> RpcResult<Account>
fn pos_account_by_pow_address( &self, address: RpcAddress, view: Option<U64>, ) -> RpcResult<Account>
fn pos_committee(&self, view: Option<U64>) -> RpcResult<CommitteeState>
fn pos_block_by_hash(&self, hash: H256) -> RpcResult<Option<Block>>
fn pos_block_by_number(&self, number: BlockNumber) -> RpcResult<Option<Block>>
fn pos_transaction_by_number( &self, number: U64, ) -> RpcResult<Option<Transaction>>
fn pos_consensus_blocks(&self) -> RpcResult<Vec<Block>>
fn pos_get_epoch_state(&self, epoch: U64) -> RpcResult<Option<EpochState>>
fn pos_get_ledger_info_by_epoch( &self, epoch: U64, ) -> RpcResult<Option<LedgerInfoWithSignatures>>
fn pos_get_ledger_info_by_block_number( &self, number: BlockNumber, ) -> RpcResult<Option<LedgerInfoWithSignatures>>
fn pos_get_ledger_info_by_epoch_and_round( &self, epoch: U64, round: U64, ) -> RpcResult<Option<LedgerInfoWithSignatures>>
fn pos_get_ledger_infos_by_epoch( &self, start_epoch: U64, end_epoch: U64, ) -> RpcResult<Vec<LedgerInfoWithSignatures>>
fn pos_get_rewards_by_epoch( &self, epoch: U64, ) -> RpcResult<Option<PoSEpochReward>>
Provided Methods§
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.