pub enum VerificationResult<T> {
Verified {
payload: T,
metadata: VerificationMetadata,
},
Unverified {
payload: T,
metadata: VerificationMetadata,
failure: VerificationFailure,
},
}Expand description
Wraps StoreKit.VerificationResult.
Variants§
Verified
StoreKit verified the payload signature.
Fields
payload: TDecoded payload returned by StoreKit.
metadata: VerificationMetadataVerification metadata returned by StoreKit.
Unverified
StoreKit returned the payload but verification failed.
Fields
payload: TDecoded payload returned by StoreKit.
metadata: VerificationMetadataVerification metadata returned by StoreKit.
failure: VerificationFailureVerification failure returned by StoreKit.
Implementations§
Source§impl VerificationResult<Transaction>
impl VerificationResult<Transaction>
Sourcepub fn advanced_commerce_info(
&self,
) -> Result<Option<TransactionAdvancedCommerceInfo>, StoreKitError>
pub fn advanced_commerce_info( &self, ) -> Result<Option<TransactionAdvancedCommerceInfo>, StoreKitError>
Returns advanced-commerce metadata decoded from the StoreKit.Transaction payload.
Source§impl VerificationResult<RenewalInfo>
impl VerificationResult<RenewalInfo>
Sourcepub fn advanced_commerce_info(
&self,
) -> Result<Option<RenewalInfoAdvancedCommerceInfo>, StoreKitError>
pub fn advanced_commerce_info( &self, ) -> Result<Option<RenewalInfoAdvancedCommerceInfo>, StoreKitError>
Returns advanced-commerce metadata decoded from the StoreKit.RenewalInfo payload.
Source§impl<T> VerificationResult<T>
impl<T> VerificationResult<T>
Sourcepub const fn is_verified(&self) -> bool
pub const fn is_verified(&self) -> bool
Returns true when StoreKit verified the payload.
Sourcepub fn into_payload(self) -> T
pub fn into_payload(self) -> T
Consumes the wrapper and returns the decoded StoreKit payload.
Sourcepub const fn metadata(&self) -> &VerificationMetadata
pub const fn metadata(&self) -> &VerificationMetadata
Returns the verification metadata returned by StoreKit.
Sourcepub const fn verification_failure(&self) -> Option<&VerificationFailure>
pub const fn verification_failure(&self) -> Option<&VerificationFailure>
Returns the verification failure reported by StoreKit, if any.
Sourcepub fn into_parts(
self,
) -> (T, VerificationMetadata, Option<VerificationFailure>)
pub fn into_parts( self, ) -> (T, VerificationMetadata, Option<VerificationFailure>)
Consumes the wrapper and returns the payload, metadata, and optional verification failure.
Sourcepub fn jws_representation(&self) -> &str
pub fn jws_representation(&self) -> &str
Returns the compact JWS representation returned by StoreKit.
Trait Implementations§
Source§impl<T: Clone> Clone for VerificationResult<T>
impl<T: Clone> Clone for VerificationResult<T>
Source§fn clone(&self) -> VerificationResult<T>
fn clone(&self) -> VerificationResult<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T: Debug> Debug for VerificationResult<T>
impl<T: Debug> Debug for VerificationResult<T>
Source§impl<T: PartialEq> PartialEq for VerificationResult<T>
impl<T: PartialEq> PartialEq for VerificationResult<T>
Source§fn eq(&self, other: &VerificationResult<T>) -> bool
fn eq(&self, other: &VerificationResult<T>) -> bool
self and other values to be equal, and is used by ==.