Trait sc_rpc::statement::StatementApiServer
pub trait StatementApiServer: Sized + Send + Sync + 'static {
// Required methods
fn dump(&self, ext: &Extensions) -> Result<Vec<Bytes>, ErrorObject<'static>>;
fn broadcasts(
&self,
match_all_topics: Vec<[u8; 32]>,
) -> Result<Vec<Bytes>, ErrorObject<'static>>;
fn posted(
&self,
match_all_topics: Vec<[u8; 32]>,
dest: [u8; 32],
) -> Result<Vec<Bytes>, ErrorObject<'static>>;
fn posted_clear(
&self,
match_all_topics: Vec<[u8; 32]>,
dest: [u8; 32],
) -> Result<Vec<Bytes>, ErrorObject<'static>>;
fn submit(&self, encoded: Bytes) -> Result<(), ErrorObject<'static>>;
fn remove(
&self,
statement_hash: [u8; 32],
) -> Result<(), ErrorObject<'static>>;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Re-export the API for backward compatibility.
Server trait implementation for the StatementApi
RPC API.
Required Methods§
fn dump(&self, ext: &Extensions) -> Result<Vec<Bytes>, ErrorObject<'static>>
fn dump(&self, ext: &Extensions) -> Result<Vec<Bytes>, ErrorObject<'static>>
Return all statements, SCALE-encoded.
fn broadcasts(
&self,
match_all_topics: Vec<[u8; 32]>,
) -> Result<Vec<Bytes>, ErrorObject<'static>>
fn broadcasts( &self, match_all_topics: Vec<[u8; 32]>, ) -> Result<Vec<Bytes>, ErrorObject<'static>>
Return the data of all known statements which include all topics and have no DecryptionKey
field.
fn posted(
&self,
match_all_topics: Vec<[u8; 32]>,
dest: [u8; 32],
) -> Result<Vec<Bytes>, ErrorObject<'static>>
fn posted( &self, match_all_topics: Vec<[u8; 32]>, dest: [u8; 32], ) -> Result<Vec<Bytes>, ErrorObject<'static>>
Return the data of all known statements whose decryption key is identified as dest
(this
will generally be the public key or a hash thereof for symmetric ciphers, or a hash of the
private key for symmetric ciphers).
Provided Methods§
fn into_rpc(self) -> RpcModule<Self>
fn into_rpc(self) -> RpcModule<Self>
Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule
.
Object Safety§
This trait is not object safe.