pub trait GovernanceReadApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn get_stakes_by_ids<'life0, 'async_trait>(
&'life0 self,
staked_iota_ids: Vec<ObjectID>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedStake>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_stakes<'life0, 'async_trait>(
&'life0 self,
owner: IotaAddress,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedStake>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_timelocked_stakes_by_ids<'life0, 'async_trait>(
&'life0 self,
timelocked_staked_iota_ids: Vec<ObjectID>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedTimelockedStake>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_timelocked_stakes<'life0, 'async_trait>(
&'life0 self,
owner: IotaAddress,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedTimelockedStake>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_committee_info<'life0, 'async_trait>(
&'life0 self,
epoch: Option<BigInt<u64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaCommittee>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_latest_iota_system_state_v2<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaSystemStateSummary>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_latest_iota_system_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaSystemStateSummaryV1>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_reference_gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<BigInt<u64>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_validators_apy<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ValidatorApys>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the GovernanceReadApi
RPC API.
Required Methods§
Sourcefn get_stakes_by_ids<'life0, 'async_trait>(
&'life0 self,
staked_iota_ids: Vec<ObjectID>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedStake>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_stakes_by_ids<'life0, 'async_trait>(
&'life0 self,
staked_iota_ids: Vec<ObjectID>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedStake>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return one or more DelegatedStake. If a Stake was withdrawn its status will be Unstaked.
Sourcefn get_stakes<'life0, 'async_trait>(
&'life0 self,
owner: IotaAddress,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedStake>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_stakes<'life0, 'async_trait>(
&'life0 self,
owner: IotaAddress,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedStake>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return all DelegatedStake.
Sourcefn get_timelocked_stakes_by_ids<'life0, 'async_trait>(
&'life0 self,
timelocked_staked_iota_ids: Vec<ObjectID>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedTimelockedStake>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_timelocked_stakes_by_ids<'life0, 'async_trait>(
&'life0 self,
timelocked_staked_iota_ids: Vec<ObjectID>,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedTimelockedStake>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return one or more DelegatedTimelockedStake. If a Stake was withdrawn its status will be Unstaked.
Sourcefn get_timelocked_stakes<'life0, 'async_trait>(
&'life0 self,
owner: IotaAddress,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedTimelockedStake>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_timelocked_stakes<'life0, 'async_trait>(
&'life0 self,
owner: IotaAddress,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<DelegatedTimelockedStake>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return all DelegatedTimelockedStake.
Sourcefn get_committee_info<'life0, 'async_trait>(
&'life0 self,
epoch: Option<BigInt<u64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaCommittee>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_committee_info<'life0, 'async_trait>(
&'life0 self,
epoch: Option<BigInt<u64>>,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaCommittee>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the committee information for the asked epoch
.
Sourcefn get_latest_iota_system_state_v2<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaSystemStateSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_iota_system_state_v2<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaSystemStateSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the latest IOTA system state object on networks supporting
protocol version >= 5
. These are networks with node software release
version >= 0.11
.
Sourcefn get_latest_iota_system_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaSystemStateSummaryV1>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_iota_system_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<IotaSystemStateSummaryV1>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the latest IOTA system state object on networks supporting
protocol version < 5
. These are networks with node software release
version < 0.11
.
Sourcefn get_reference_gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<BigInt<u64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_reference_gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<BigInt<u64>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the reference gas price for the network
Sourcefn get_validators_apy<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ValidatorApys>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_validators_apy<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ValidatorApys>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the validator APY
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.