pub struct AdvancedCommerceProduct {
pub id: String,
pub product_type: ProductType,
}Fields§
§id: String§product_type: ProductTypeImplementations§
Source§impl AdvancedCommerceProduct
impl AdvancedCommerceProduct
Sourcepub fn new(id: &str) -> Result<Self, StoreKitError>
pub fn new(id: &str) -> Result<Self, StoreKitError>
Examples found in repository?
examples/18_advanced_commerce.rs (line 12)
6fn main() {
7 let kind = AppStoreMerchandisingKind::subscription_bundle("com.example.bundle");
8 println!("merchandising kind: {kind:?}");
9 println!("age rating code: {:?}", AppStore::age_rating_code());
10 println!(
11 "advanced-commerce product lookup: {:?}",
12 AdvancedCommerceProduct::new("com.example.advanced")
13 );
14 println!(
15 "advanced-commerce purchase option: {:?}",
16 AdvancedCommercePurchaseOption::OnStorefrontChange {
17 should_continue_purchase: true,
18 }
19 );
20}pub fn purchase_in_window( &self, compact_jws: &str, window: &NSWindowHandle, options: &[AdvancedCommercePurchaseOption], ) -> Result<PurchaseResult, StoreKitError>
pub fn latest_transaction( &self, ) -> Result<Option<VerificationResult<Transaction>>, StoreKitError>
pub fn all_transactions(&self) -> Result<TransactionStream, StoreKitError>
pub fn current_entitlements(&self) -> Result<TransactionStream, StoreKitError>
Trait Implementations§
Source§impl Clone for AdvancedCommerceProduct
impl Clone for AdvancedCommerceProduct
Source§fn clone(&self) -> AdvancedCommerceProduct
fn clone(&self) -> AdvancedCommerceProduct
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AdvancedCommerceProduct
impl Debug for AdvancedCommerceProduct
Source§impl PartialEq for AdvancedCommerceProduct
impl PartialEq for AdvancedCommerceProduct
Source§fn eq(&self, other: &AdvancedCommerceProduct) -> bool
fn eq(&self, other: &AdvancedCommerceProduct) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for AdvancedCommerceProduct
impl StructuralPartialEq for AdvancedCommerceProduct
Auto Trait Implementations§
impl Freeze for AdvancedCommerceProduct
impl RefUnwindSafe for AdvancedCommerceProduct
impl Send for AdvancedCommerceProduct
impl Sync for AdvancedCommerceProduct
impl Unpin for AdvancedCommerceProduct
impl UnsafeUnpin for AdvancedCommerceProduct
impl UnwindSafe for AdvancedCommerceProduct
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more