pub trait StatementSpecApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn statement_unstable_add_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
ext: &'life1 Extensions,
subscription: String,
topic_filter: TopicFilter,
) -> Pin<Box<dyn Future<Output = Result<AddFilterResponse, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn statement_unstable_remove_filter(
&self,
ext: &Extensions,
subscription: String,
filter_id: String,
) -> Result<(), Error>;
fn statement_unstable_submit(
&self,
encoded: Bytes,
) -> Result<SubmitOutcome, Error>;
fn statement_unstable_subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
ext: &'life1 Extensions,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}Expand description
Server trait implementation for the StatementSpecApi RPC API.
Required Methods§
Sourcefn statement_unstable_add_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
ext: &'life1 Extensions,
subscription: String,
topic_filter: TopicFilter,
) -> Pin<Box<dyn Future<Output = Result<AddFilterResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn statement_unstable_add_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
ext: &'life1 Extensions,
subscription: String,
topic_filter: TopicFilter,
) -> Pin<Box<dyn Future<Output = Result<AddFilterResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Attaches a filter to an existing subscription
Sourcefn statement_unstable_remove_filter(
&self,
ext: &Extensions,
subscription: String,
filter_id: String,
) -> Result<(), Error>
fn statement_unstable_remove_filter( &self, ext: &Extensions, subscription: String, filter_id: String, ) -> Result<(), Error>
Detaches a filter from a subscription
Sourcefn statement_unstable_submit(
&self,
encoded: Bytes,
) -> Result<SubmitOutcome, Error>
fn statement_unstable_submit( &self, encoded: Bytes, ) -> Result<SubmitOutcome, Error>
Submits a SCALE-encoded statement to the store
Sourcefn statement_unstable_subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
ext: &'life1 Extensions,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn statement_unstable_subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
ext: &'life1 Extensions,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Opens a new statement 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.