pub trait GraphQlClientExt: GraphQlClient + Sized {
// Provided methods
fn clearing_house_orders(
&self,
package: Address,
ch: Address,
at_checkpoint: Option<u64>,
asks: bool,
) -> impl Stream<Item = Result<(u128, Order), Error<<Self as GraphQlClient>::Error>>> + '_ { ... }
fn map_orders(
&self,
map: Address,
at_checkpoint: Option<Version>,
) -> impl Stream<Item = Result<(u128, Order), Error<<Self as GraphQlClient>::Error>>> + '_ { ... }
fn order_maps(
&self,
package: Address,
ch: Address,
) -> impl Future<Output = Result<OrderMaps, Error<<Self as GraphQlClient>::Error>>> + Send + '_ { ... }
fn clearing_house_vault(
&self,
package: Address,
ch: Address,
) -> impl Future<Output = Result<MoveInstance<Vault>, ChVaultError<Self::Error>>> + Send + '_ { ... }
fn clearing_house_positions(
&self,
ch: Address,
at_checkpoint: Option<u64>,
) -> impl Stream<Item = Result<(u64, MoveInstance<Position>), Error<<Self as GraphQlClient>::Error>>> + '_ { ... }
}Expand description
Extension trait to GraphQlClient collecting all defined queries in one place.
Provided Methods§
Sourcefn clearing_house_orders(
&self,
package: Address,
ch: Address,
at_checkpoint: Option<u64>,
asks: bool,
) -> impl Stream<Item = Result<(u128, Order), Error<<Self as GraphQlClient>::Error>>> + '_
fn clearing_house_orders( &self, package: Address, ch: Address, at_checkpoint: Option<u64>, asks: bool, ) -> impl Stream<Item = Result<(u128, Order), Error<<Self as GraphQlClient>::Error>>> + '_
Snapshot of the orders on one side of the orderbook, rooted at the ClearingHouse id
and version.
If you already know the object ID of the orders Map, then map_orders is more
efficient.
Sourcefn map_orders(
&self,
map: Address,
at_checkpoint: Option<Version>,
) -> impl Stream<Item = Result<(u128, Order), Error<<Self as GraphQlClient>::Error>>> + '_
fn map_orders( &self, map: Address, at_checkpoint: Option<Version>, ) -> impl Stream<Item = Result<(u128, Order), Error<<Self as GraphQlClient>::Error>>> + '_
Snapshot of the orders on one side of the orderbook, rooted at the Map id and
ClearingHouse version.
To find the Map id, you can use order_maps.
Sourcefn order_maps(
&self,
package: Address,
ch: Address,
) -> impl Future<Output = Result<OrderMaps, Error<<Self as GraphQlClient>::Error>>> + Send + '_
fn order_maps( &self, package: Address, ch: Address, ) -> impl Future<Output = Result<OrderMaps, Error<<Self as GraphQlClient>::Error>>> + Send + '_
Object IDs of the orderbook and asks/bids maps for a market.
These never change, so you can query them once and save them.
Sourcefn clearing_house_vault(
&self,
package: Address,
ch: Address,
) -> impl Future<Output = Result<MoveInstance<Vault>, ChVaultError<Self::Error>>> + Send + '_
fn clearing_house_vault( &self, package: Address, ch: Address, ) -> impl Future<Output = Result<MoveInstance<Vault>, ChVaultError<Self::Error>>> + Send + '_
The unparsed clearing house’s collateral Vault.
Sourcefn clearing_house_positions(
&self,
ch: Address,
at_checkpoint: Option<u64>,
) -> impl Stream<Item = Result<(u64, MoveInstance<Position>), Error<<Self as GraphQlClient>::Error>>> + '_
fn clearing_house_positions( &self, ch: Address, at_checkpoint: Option<u64>, ) -> impl Stream<Item = Result<(u64, MoveInstance<Position>), Error<<Self as GraphQlClient>::Error>>> + '_
Snapshot of positions under the ClearingHouse.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".