pub trait GraphQlClientExt: GraphQlClient + Sized {
// Provided methods
fn price_feeds(
&self,
pfs: ObjectId,
version: Option<Version>,
) -> impl Stream<Item = Result<(ObjectId, MoveInstance<PriceFeed>), Error<Self::Error>>> + '_ { ... }
fn price_feed_for_source(
&self,
af_oracle_pkg: Address,
pfs: ObjectId,
source_wrapper_id: ObjectId,
) -> impl Future<Output = Result<Option<MoveInstance<PriceFeed>>, PfForSourceError<Self::Error>>> + Send { ... }
}
Available on crate feature
graphql
only.Expand description
Extension trait to GraphQlClient
collecting all defined queries in one place.
Provided Methods§
Sourcefn price_feeds(
&self,
pfs: ObjectId,
version: Option<Version>,
) -> impl Stream<Item = Result<(ObjectId, MoveInstance<PriceFeed>), Error<Self::Error>>> + '_
fn price_feeds( &self, pfs: ObjectId, version: Option<Version>, ) -> impl Stream<Item = Result<(ObjectId, MoveInstance<PriceFeed>), Error<Self::Error>>> + '_
Snapshot of price feeds under the PriceFeedStorage
.
Returns tuples representing (source_wrapper_id
, price_feed
)
Sourcefn price_feed_for_source(
&self,
af_oracle_pkg: Address,
pfs: ObjectId,
source_wrapper_id: ObjectId,
) -> impl Future<Output = Result<Option<MoveInstance<PriceFeed>>, PfForSourceError<Self::Error>>> + Send
fn price_feed_for_source( &self, af_oracle_pkg: Address, pfs: ObjectId, source_wrapper_id: ObjectId, ) -> impl Future<Output = Result<Option<MoveInstance<PriceFeed>>, PfForSourceError<Self::Error>>> + Send
Get a price feed under the PriceFeedStorage
, given a specific source_wrapper_id
.
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.