Trait loans_rpc::LoansApiServer 
source · pub trait LoansApiServer<BlockHash, AccountId, Balance>: Sized + Send + Sync + 'staticwhere
    Balance: Codec + Copy + TryFrom<NumberOrHex>,{
    // Required methods
    fn get_account_liquidity(
        &self,
        account: AccountId,
        at: Option<BlockHash>
    ) -> RpcResult<(Liquidity, Shortfall)>;
    fn get_market_status(
        &self,
        asset_id: CurrencyId,
        at: Option<BlockHash>
    ) -> RpcResult<(Rate, Rate, Rate, Ratio, NumberOrHex, NumberOrHex, FixedU128)>;
    fn get_liquidation_threshold_liquidity(
        &self,
        account: AccountId,
        at: Option<BlockHash>
    ) -> RpcResult<(Liquidity, Shortfall)>;
    // Provided method
    fn into_rpc(self) -> RpcModule<Self>
       where BlockHash: Send + Sync + 'static + DeserializeOwned,
             AccountId: Send + Sync + 'static + DeserializeOwned,
             Balance: Send + Sync + 'static + Codec + Copy + TryFrom<NumberOrHex> { ... }
}Expand description
Server trait implementation for the LoansApi RPC API.
Required Methods§
fn get_account_liquidity( &self, account: AccountId, at: Option<BlockHash> ) -> RpcResult<(Liquidity, Shortfall)>
fn get_market_status( &self, asset_id: CurrencyId, at: Option<BlockHash> ) -> RpcResult<(Rate, Rate, Rate, Ratio, NumberOrHex, NumberOrHex, FixedU128)>
fn get_liquidation_threshold_liquidity( &self, account: AccountId, at: Option<BlockHash> ) -> RpcResult<(Liquidity, Shortfall)>
Provided Methods§
sourcefn into_rpc(self) -> RpcModule<Self>where
    BlockHash: Send + Sync + 'static + DeserializeOwned,
    AccountId: Send + Sync + 'static + DeserializeOwned,
    Balance: Send + Sync + 'static + Codec + Copy + TryFrom<NumberOrHex>,
 
fn into_rpc(self) -> RpcModule<Self>where BlockHash: Send + Sync + 'static + DeserializeOwned, AccountId: Send + Sync + 'static + DeserializeOwned, Balance: Send + Sync + 'static + Codec + Copy + TryFrom<NumberOrHex>,
Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.