Skip to main content

FarmerRpcApiServer

Trait FarmerRpcApiServer 

Source
pub trait FarmerRpcApiServer:
    Sized
    + Send
    + Sync
    + 'static {
Show 13 methods // Required methods fn get_farmer_app_info(&self) -> Result<FarmerAppInfo, Error>; fn submit_solution_response( &self, solution_response: SolutionResponse, ) -> Result<(), Error>; fn submit_block_seal( &self, block_seal: BlockSealResponse, ) -> Result<(), Error>; fn super_segment_headers<'life0, 'async_trait>( &'life0 self, super_segment_indices: Vec<SuperSegmentIndex>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SuperSegmentHeader>>, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn segment_headers<'life0, 'async_trait>( &'life0 self, segment_indices: Vec<SegmentIndex>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SegmentHeader>>, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn piece(&self, piece_index: PieceIndex) -> Result<Option<Piece>, Error>; fn acknowledge_archived_segment_header<'life0, 'async_trait>( &'life0 self, segment_index: SegmentIndex, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn last_segment_headers<'life0, 'async_trait>( &'life0 self, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SegmentHeader>>, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_shard_membership_info<'life0, 'life1, 'async_trait>( &'life0 self, ext: &'life1 Extensions, info: Vec<FarmerShardMembershipInfo>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn subscribe_slot_info<'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_block_seal<'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_archived_segment_header<'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 FarmerRpcApi RPC API.

Required Methods§

Source

fn get_farmer_app_info(&self) -> Result<FarmerAppInfo, Error>

Get metadata necessary for farmer operation

Source

fn submit_solution_response( &self, solution_response: SolutionResponse, ) -> Result<(), Error>

Source

fn submit_block_seal(&self, block_seal: BlockSealResponse) -> Result<(), Error>

Source

fn super_segment_headers<'life0, 'async_trait>( &'life0 self, super_segment_indices: Vec<SuperSegmentIndex>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SuperSegmentHeader>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn segment_headers<'life0, 'async_trait>( &'life0 self, segment_indices: Vec<SegmentIndex>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SegmentHeader>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn piece(&self, piece_index: PieceIndex) -> Result<Option<Piece>, Error>

Source

fn acknowledge_archived_segment_header<'life0, 'async_trait>( &'life0 self, segment_index: SegmentIndex, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn last_segment_headers<'life0, 'async_trait>( &'life0 self, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SegmentHeader>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_shard_membership_info<'life0, 'life1, 'async_trait>( &'life0 self, ext: &'life1 Extensions, info: Vec<FarmerShardMembershipInfo>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn subscribe_slot_info<'life0, 'async_trait>( &'life0 self, subscription_sink: PendingSubscriptionSink, ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Slot info subscription

Source

fn subscribe_block_seal<'life0, 'async_trait>( &'life0 self, subscription_sink: PendingSubscriptionSink, ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Sign block subscription

Source

fn subscribe_archived_segment_header<'life0, 'async_trait>( &'life0 self, subscription_sink: PendingSubscriptionSink, ) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Archived segment header subscription

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

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§