Trait pallet_schemas_rpc::SchemasApiServer
source · pub trait SchemasApiServer<BlockHash>: Sized + Send + Sync + 'static {
// Required methods
fn get_by_schema_id(
&self,
schema_id: SchemaId
) -> RpcResult<Option<SchemaResponse>>;
fn check_schema_validity(
&self,
model: Vec<u8>,
at: Option<BlockHash>
) -> RpcResult<bool>;
fn get_versions(
&self,
schema_name: String
) -> RpcResult<Option<Vec<SchemaVersionResponse>>>;
// Provided method
fn into_rpc(self) -> RpcModule<Self>
where BlockHash: Send + Sync + 'static + DeserializeOwned { ... }
}
Expand description
Server trait implementation for the SchemasApi
RPC API.
Required Methods§
sourcefn get_by_schema_id(
&self,
schema_id: SchemaId
) -> RpcResult<Option<SchemaResponse>>
fn get_by_schema_id( &self, schema_id: SchemaId ) -> RpcResult<Option<SchemaResponse>>
retrieving schema by schema id
sourcefn check_schema_validity(
&self,
model: Vec<u8>,
at: Option<BlockHash>
) -> RpcResult<bool>
fn check_schema_validity( &self, model: Vec<u8>, at: Option<BlockHash> ) -> RpcResult<bool>
validates a schema model and returns true
if the model is correct.
sourcefn get_versions(
&self,
schema_name: String
) -> RpcResult<Option<Vec<SchemaVersionResponse>>>
fn get_versions( &self, schema_name: String ) -> RpcResult<Option<Vec<SchemaVersionResponse>>>
returns an array of schema versions
Provided Methods§
Object Safety§
This trait is not object safe.