pub struct AdvancedCommerceProduct {
pub id: String,
pub product_type: ProductType,
}Expand description
Wraps a StoreKit advanced-commerce product.
Fields§
§id: StringStoreKit identifier for this value.
product_type: ProductTypeProduct type reported by StoreKit.
Implementations§
Source§impl AdvancedCommerceProduct
impl AdvancedCommerceProduct
Sourcepub fn new(id: &str) -> Result<Self, StoreKitError>
pub fn new(id: &str) -> Result<Self, StoreKitError>
Fetches the StoreKit advanced-commerce product for the supplied identifier.
Sourcepub fn purchase_in_window(
&self,
compact_jws: &str,
window: &NSWindowHandle,
options: &[AdvancedCommercePurchaseOption],
) -> Result<PurchaseResult, StoreKitError>
pub fn purchase_in_window( &self, compact_jws: &str, window: &NSWindowHandle, options: &[AdvancedCommercePurchaseOption], ) -> Result<PurchaseResult, StoreKitError>
Calls the StoreKit advanced-commerce purchase API while presenting UI in the supplied NSWindow.
Sourcepub fn latest_transaction(
&self,
) -> Result<Option<VerificationResult<Transaction>>, StoreKitError>
pub fn latest_transaction( &self, ) -> Result<Option<VerificationResult<Transaction>>, StoreKitError>
Fetches the latest StoreKit transaction for this advanced-commerce product.
Sourcepub fn all_transactions(&self) -> Result<TransactionStream, StoreKitError>
pub fn all_transactions(&self) -> Result<TransactionStream, StoreKitError>
Creates a stream of all StoreKit transactions for this advanced-commerce product.
Sourcepub fn current_entitlements(&self) -> Result<TransactionStream, StoreKitError>
pub fn current_entitlements(&self) -> Result<TransactionStream, StoreKitError>
Creates a stream of current StoreKit entitlements for this advanced-commerce product.
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