Skip to main content

Module async_api

Module async_api 

Source
Available on crate feature async only.
Expand description

Async API for StoreKit — Tier 1 Future wrappers.

This module requires the async Cargo feature:

storekit-rs = { version = "0.3", features = ["async"] }

Every public type is an executor-agnostic Future backed by a doom_fish_utils completion handler. The futures work with any async runtime (tokio, async-std, smol, pollster, …).

§Available types

TypeDescription
AsyncProductsFetch products by identifier
AsyncPurchasePurchase a product
AsyncAppStoreRequest review / manage subscriptions
AsyncAppTransactionFetch the app transaction
AsyncStorefrontFetch the current storefront

§AsyncSequence APIs — deferred to Tier 2

The following StoreKit APIs expose AsyncSequence (multi-fire streams). They are intentionally not included here; they will be wrapped as Stream types in the Tier 2 rollout:

§Examples

use storekit::async_api::{AsyncProducts, AsyncAppTransaction};

let products = AsyncProducts::fetch(["com.example.pro"])?.await?;
println!("{} product(s) found", products.len());

let app_tx = AsyncAppTransaction::shared().await?;
println!("bundle: {}", app_tx.payload().bundle_id);

Structs§

AppTransactionFuture
Future for AsyncAppTransaction::shared.
AsyncAppStore
Async wrapper for AppStore UI APIs.
AsyncAppTransaction
Async wrapper for AppTransaction.shared.
AsyncProducts
Async wrapper for Product.products(for:).
AsyncPurchase
Async wrapper for Product.purchase(options:).
AsyncStorefront
Async wrapper for Storefront.current.
ProductsFuture
Future for AsyncProducts::fetch.
PurchaseFuture
Future for AsyncPurchase::buy.
RequestReviewFuture
Future for AsyncAppStore::request_review.
ShowManageSubscriptionsFuture
Future for AsyncAppStore::show_manage_subscriptions.
StorefrontCurrentFuture
Future for AsyncStorefront::current.