pub trait OracleProxyApiServer<BlockHash, Symbol, Rate, ResolveTime>: Sized + Send + Sync + 'static {
// Required methods
fn quote(
&self,
symbol: Symbol,
at: Option<BlockHash>
) -> RpcResult<Result<Option<Rate>, DispatchError>>;
fn list_enabled_symbols(
&self,
at: Option<BlockHash>
) -> RpcResult<Result<Vec<(Symbol, ResolveTime)>, DispatchError>>;
// Provided method
fn into_rpc(self) -> RpcModule<Self>
where BlockHash: Send + Sync + 'static + DeserializeOwned,
Symbol: Send + Sync + 'static + DeserializeOwned + Serialize,
Rate: Send + Sync + 'static + Serialize,
ResolveTime: Send + Sync + 'static + Serialize { ... }
}
Expand description
Server trait implementation for the OracleProxyApi
RPC API.
Required Methods§
fn quote( &self, symbol: Symbol, at: Option<BlockHash> ) -> RpcResult<Result<Option<Rate>, DispatchError>>
fn list_enabled_symbols( &self, at: Option<BlockHash> ) -> RpcResult<Result<Vec<(Symbol, ResolveTime)>, DispatchError>>
Provided Methods§
sourcefn into_rpc(self) -> RpcModule<Self>where
BlockHash: Send + Sync + 'static + DeserializeOwned,
Symbol: Send + Sync + 'static + DeserializeOwned + Serialize,
Rate: Send + Sync + 'static + Serialize,
ResolveTime: Send + Sync + 'static + Serialize,
fn into_rpc(self) -> RpcModule<Self>where BlockHash: Send + Sync + 'static + DeserializeOwned, Symbol: Send + Sync + 'static + DeserializeOwned + Serialize, Rate: Send + Sync + 'static + Serialize, ResolveTime: Send + Sync + 'static + Serialize,
Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule
.