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,
ext: &Extensions,
solution_response: SolutionResponse,
) -> Result<(), Error>;
fn submit_reward_signature(
&self,
ext: &Extensions,
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,
ext: &Extensions,
piece_index: PieceIndex,
) -> Result<Option<Piece>, Error>;
fn acknowledge_archived_segment_header<'life0, 'life1, 'async_trait>(
&'life0 self,
ext: &'life1 Extensions,
segment_index: SegmentIndex,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: '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 subscribe_slot_info(
&self,
subscription_sink: PendingSubscriptionSink,
ext: &Extensions,
);
fn subscribe_reward_signing(
&self,
subscription_sink: PendingSubscriptionSink,
ext: &Extensions,
);
fn subscribe_archived_segment_header(
&self,
subscription_sink: PendingSubscriptionSink,
ext: &Extensions,
);
fn subscribe_object_mappings(
&self,
subscription_sink: PendingSubscriptionSink,
ext: &Extensions,
);
fn subscribe_filtered_object_mappings(
&self,
subscription_sink: PendingSubscriptionSink,
ext: &Extensions,
hashes: Vec<Blake3Hash>,
);
// 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, ext: &Extensions, solution_response: SolutionResponse, ) -> Result<(), Error>
fn submit_reward_signature( &self, ext: &Extensions, 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, ext: &Extensions, piece_index: PieceIndex, ) -> Result<Option<Piece>, Error>
fn acknowledge_archived_segment_header<'life0, 'life1, 'async_trait>(
&'life0 self,
ext: &'life1 Extensions,
segment_index: SegmentIndex,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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,
sourcefn subscribe_slot_info(
&self,
subscription_sink: PendingSubscriptionSink,
ext: &Extensions,
)
fn subscribe_slot_info( &self, subscription_sink: PendingSubscriptionSink, ext: &Extensions, )
Slot info subscription
sourcefn subscribe_reward_signing(
&self,
subscription_sink: PendingSubscriptionSink,
ext: &Extensions,
)
fn subscribe_reward_signing( &self, subscription_sink: PendingSubscriptionSink, ext: &Extensions, )
Sign block subscription
sourcefn subscribe_archived_segment_header(
&self,
subscription_sink: PendingSubscriptionSink,
ext: &Extensions,
)
fn subscribe_archived_segment_header( &self, subscription_sink: PendingSubscriptionSink, ext: &Extensions, )
Archived segment header subscription
sourcefn subscribe_object_mappings(
&self,
subscription_sink: PendingSubscriptionSink,
ext: &Extensions,
)
fn subscribe_object_mappings( &self, subscription_sink: PendingSubscriptionSink, ext: &Extensions, )
DSN object mappings subscription
sourcefn subscribe_filtered_object_mappings(
&self,
subscription_sink: PendingSubscriptionSink,
ext: &Extensions,
hashes: Vec<Blake3Hash>,
)
fn subscribe_filtered_object_mappings( &self, subscription_sink: PendingSubscriptionSink, ext: &Extensions, hashes: Vec<Blake3Hash>, )
Filtered DSN object mappings subscription
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.