pub trait MassaApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn get_largest_stakers<'life0, 'async_trait>(
&'life0 self,
page_request: Option<ApiRequest>,
) -> Pin<Box<dyn Future<Output = RpcResult<PagedVecV2<(Address, u64)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_next_block_best_parents<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<(BlockId, u64)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Version>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_new_blocks<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_new_blocks_headers<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_new_filled_blocks<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_new_operations<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + 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 MassaApi RPC API.
Required Methods§
Sourcefn get_largest_stakers<'life0, 'async_trait>(
&'life0 self,
page_request: Option<ApiRequest>,
) -> Pin<Box<dyn Future<Output = RpcResult<PagedVecV2<(Address, u64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_largest_stakers<'life0, 'async_trait>(
&'life0 self,
page_request: Option<ApiRequest>,
) -> Pin<Box<dyn Future<Output = RpcResult<PagedVecV2<(Address, u64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the active stakers and their active roll counts for the current cycle sorted by largest roll counts.
Sourcefn get_next_block_best_parents<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<(BlockId, u64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_next_block_best_parents<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<(BlockId, u64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the ids of best parents for the next block to be produced along with their period
Sourcefn get_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Version>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Version>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get Massa node version.
Sourcefn subscribe_new_blocks<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_new_blocks<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
New produced block.
Sourcefn subscribe_new_blocks_headers<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_new_blocks_headers<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
New produced blocks headers.
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.