pub enum SubscriptionOfferType {
Introductory,
Promotional,
WinBack,
Unknown(String),
}Variants§
Implementations§
Source§impl SubscriptionOfferType
impl SubscriptionOfferType
pub fn localized_description(&self) -> Result<String, StoreKitError>
Source§impl SubscriptionOfferType
impl SubscriptionOfferType
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Examples found in repository?
examples/05_subscription_types.rs (line 17)
5fn main() {
6 let period = SubscriptionPeriod {
7 unit: SubscriptionPeriodUnit::Month,
8 value: 1,
9 };
10 println!(
11 "subscription period: {} {}",
12 period.value,
13 period.unit.as_str()
14 );
15 println!(
16 "offer type: {}",
17 SubscriptionOfferType::Promotional.as_str()
18 );
19 println!(
20 "payment mode: {}",
21 SubscriptionPaymentMode::PayAsYouGo.as_str()
22 );
23}Trait Implementations§
Source§impl Clone for SubscriptionOfferType
impl Clone for SubscriptionOfferType
Source§fn clone(&self) -> SubscriptionOfferType
fn clone(&self) -> SubscriptionOfferType
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 SubscriptionOfferType
impl Debug for SubscriptionOfferType
Source§impl PartialEq for SubscriptionOfferType
impl PartialEq for SubscriptionOfferType
Source§fn eq(&self, other: &SubscriptionOfferType) -> bool
fn eq(&self, other: &SubscriptionOfferType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SubscriptionOfferType
impl StructuralPartialEq for SubscriptionOfferType
Auto Trait Implementations§
impl Freeze for SubscriptionOfferType
impl RefUnwindSafe for SubscriptionOfferType
impl Send for SubscriptionOfferType
impl Sync for SubscriptionOfferType
impl Unpin for SubscriptionOfferType
impl UnsafeUnpin for SubscriptionOfferType
impl UnwindSafe for SubscriptionOfferType
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