pub trait GraphQlClientExt: GraphQlClient + Sized {
// Provided methods
fn clearing_house_orders(
&self,
package: Address,
ch: ObjectId,
version: Option<Version>,
asks: bool,
) -> impl Stream<Item = Result<(u128, Order), Error<<Self as GraphQlClient>::Error>>> + '_ { ... }
fn map_orders(
&self,
map: ObjectId,
ch_version: Option<Version>,
) -> impl Stream<Item = Result<(u128, Order), Error<<Self as GraphQlClient>::Error>>> + '_ { ... }
fn order_maps(
&self,
package: Address,
ch: ObjectId,
) -> impl Future<Output = Result<OrderMaps, Error<<Self as GraphQlClient>::Error>>> + Send + '_ { ... }
fn clearing_house_vault(
&self,
package: Address,
ch: ObjectId,
) -> impl Future<Output = Result<MoveInstance<Vault>, ChVaultError<Self::Error>>> + Send + '_ { ... }
fn clearing_house_positions(
&self,
ch: ObjectId,
version: Option<Version>,
) -> impl Stream<Item = Result<(u64, MoveInstance<Position>), Error<<Self as GraphQlClient>::Error>>> + '_ { ... }
fn registered_clearing_houses(
&self,
registry_address: ObjectId,
version: Option<Version>,
) -> impl Stream<Item = Result<ObjectId, Error<<Self as GraphQlClient>::Error>>> + '_ { ... }
}graphql only.Expand description
Extension trait to GraphQlClient collecting all defined queries in one place.
Provided Methods§
Sourcefn clearing_house_orders(
&self,
package: Address,
ch: ObjectId,
version: Option<Version>,
asks: bool,
) -> impl Stream<Item = Result<(u128, Order), Error<<Self as GraphQlClient>::Error>>> + '_
fn clearing_house_orders( &self, package: Address, ch: ObjectId, version: Option<Version>, 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: ObjectId,
ch_version: Option<Version>,
) -> impl Stream<Item = Result<(u128, Order), Error<<Self as GraphQlClient>::Error>>> + '_
fn map_orders( &self, map: ObjectId, ch_version: 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: ObjectId,
) -> impl Future<Output = Result<OrderMaps, Error<<Self as GraphQlClient>::Error>>> + Send + '_
fn order_maps( &self, package: Address, ch: ObjectId, ) -> 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: ObjectId,
) -> impl Future<Output = Result<MoveInstance<Vault>, ChVaultError<Self::Error>>> + Send + '_
fn clearing_house_vault( &self, package: Address, ch: ObjectId, ) -> impl Future<Output = Result<MoveInstance<Vault>, ChVaultError<Self::Error>>> + Send + '_
The unparsed clearing house’s collateral Vault.
Sourcefn clearing_house_positions(
&self,
ch: ObjectId,
version: Option<Version>,
) -> impl Stream<Item = Result<(u64, MoveInstance<Position>), Error<<Self as GraphQlClient>::Error>>> + '_
fn clearing_house_positions( &self, ch: ObjectId, version: Option<Version>, ) -> impl Stream<Item = Result<(u64, MoveInstance<Position>), Error<<Self as GraphQlClient>::Error>>> + '_
Snapshot of positions under the ClearingHouse.
Sourcefn registered_clearing_houses(
&self,
registry_address: ObjectId,
version: Option<Version>,
) -> impl Stream<Item = Result<ObjectId, Error<<Self as GraphQlClient>::Error>>> + '_
fn registered_clearing_houses( &self, registry_address: ObjectId, version: Option<Version>, ) -> impl Stream<Item = Result<ObjectId, Error<<Self as GraphQlClient>::Error>>> + '_
List of registered ClearingHouse object IDs.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.