pub enum StoreKitApiErrorCode {
Unknown,
UserCancelled,
NetworkError,
SystemError,
NotAvailableInStorefront,
NotEntitled,
Unsupported,
Other(String),
}Variants§
Unknown
UserCancelled
NetworkError
SystemError
NotAvailableInStorefront
NotEntitled
Unsupported
Other(String)
Implementations§
Source§impl StoreKitApiErrorCode
impl StoreKitApiErrorCode
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Examples found in repository?
examples/19_typed_errors.rs (line 7)
6fn main() {
7 println!("StoreKit API code: {}", StoreKitApiErrorCode::Unsupported.as_str());
8 println!(
9 "Purchase error code: {}",
10 ProductPurchaseErrorCode::InvalidQuantity.as_str()
11 );
12 println!(
13 "Refund error code: {}",
14 RefundRequestErrorCode::Failed.as_str()
15 );
16 println!(
17 "Typed error sample: {:?}",
18 TypedStoreKitError::InvalidRequest(InvalidRequestError {
19 code: 17,
20 message: "invalid request".to_owned(),
21 })
22 );
23}Trait Implementations§
Source§impl Clone for StoreKitApiErrorCode
impl Clone for StoreKitApiErrorCode
Source§fn clone(&self) -> StoreKitApiErrorCode
fn clone(&self) -> StoreKitApiErrorCode
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 StoreKitApiErrorCode
impl Debug for StoreKitApiErrorCode
Source§impl PartialEq for StoreKitApiErrorCode
impl PartialEq for StoreKitApiErrorCode
Source§fn eq(&self, other: &StoreKitApiErrorCode) -> bool
fn eq(&self, other: &StoreKitApiErrorCode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for StoreKitApiErrorCode
impl StructuralPartialEq for StoreKitApiErrorCode
Auto Trait Implementations§
impl Freeze for StoreKitApiErrorCode
impl RefUnwindSafe for StoreKitApiErrorCode
impl Send for StoreKitApiErrorCode
impl Sync for StoreKitApiErrorCode
impl Unpin for StoreKitApiErrorCode
impl UnsafeUnpin for StoreKitApiErrorCode
impl UnwindSafe for StoreKitApiErrorCode
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