pub trait SubspaceRpcApiServer:
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_reward_signature(
&self,
reward_signature: RewardSignatureResponse,
) -> Result<(), Error>;
fn segment_headers<'life0, 'async_trait>(
&'life0 self,
segment_indexes: 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: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SegmentHeader>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_slot_info(&self, subscription_sink: PendingSubscriptionSink);
fn subscribe_reward_signing(
&self,
subscription_sink: PendingSubscriptionSink,
);
fn subscribe_archived_segment_header(
&self,
subscription_sink: PendingSubscriptionSink,
);
fn subscribe_archived_object_mappings(
&self,
subscription_sink: PendingSubscriptionSink,
);
fn subscribe_filtered_object_mappings(
&self,
subscription_sink: PendingSubscriptionSink,
hashes: Vec<Blake3HashHex>,
);
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the SubspaceRpcApi
RPC API.
Required Methods§
sourcefn get_farmer_app_info(&self) -> Result<FarmerAppInfo, Error>
fn get_farmer_app_info(&self) -> Result<FarmerAppInfo, Error>
Get metadata necessary for farmer operation
fn submit_solution_response( &self, solution_response: SolutionResponse, ) -> Result<(), Error>
fn submit_reward_signature( &self, reward_signature: RewardSignatureResponse, ) -> Result<(), Error>
fn segment_headers<'life0, 'async_trait>(
&'life0 self,
segment_indexes: 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: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SegmentHeader>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn subscribe_slot_info(&self, subscription_sink: PendingSubscriptionSink)
fn subscribe_slot_info(&self, subscription_sink: PendingSubscriptionSink)
Slot info subscription
sourcefn subscribe_reward_signing(&self, subscription_sink: PendingSubscriptionSink)
fn subscribe_reward_signing(&self, subscription_sink: PendingSubscriptionSink)
Sign block subscription
sourcefn subscribe_archived_segment_header(
&self,
subscription_sink: PendingSubscriptionSink,
)
fn subscribe_archived_segment_header( &self, subscription_sink: PendingSubscriptionSink, )
Archived segment header subscription
sourcefn subscribe_archived_object_mappings(
&self,
subscription_sink: PendingSubscriptionSink,
)
fn subscribe_archived_object_mappings( &self, subscription_sink: PendingSubscriptionSink, )
Block/transaction archived object mappings subscription
sourcefn subscribe_filtered_object_mappings(
&self,
subscription_sink: PendingSubscriptionSink,
hashes: Vec<Blake3HashHex>,
)
fn subscribe_filtered_object_mappings( &self, subscription_sink: PendingSubscriptionSink, hashes: Vec<Blake3HashHex>, )
Filtered block/transaction archived object mappings subscription
Provided Methods§
Object Safety§
This trait is not object safe.