Struct tdlib::types::PremiumPaymentOption
source · pub struct PremiumPaymentOption {
pub currency: String,
pub amount: i64,
pub discount_percentage: i32,
pub month_count: i32,
pub store_product_id: String,
pub payment_link: Option<InternalLinkType>,
}Expand description
Describes an option for buying Telegram Premium to a user
Fields§
§currency: StringISO 4217 currency code for Telegram Premium subscription payment
amount: i64The amount to pay, in the smallest units of the currency
discount_percentage: i32The discount associated with this option, as a percentage
month_count: i32Number of month the Telegram Premium subscription will be active
store_product_id: StringIdentifier of the store product associated with the option
payment_link: Option<InternalLinkType>An internal link to be opened for buying Telegram Premium to the user if store payment isn’t possible; may be null if direct payment isn’t available
Trait Implementations§
source§impl Clone for PremiumPaymentOption
impl Clone for PremiumPaymentOption
source§fn clone(&self) -> PremiumPaymentOption
fn clone(&self) -> PremiumPaymentOption
Returns a copy of the value. Read more
1.0.0 · 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 PremiumPaymentOption
impl Debug for PremiumPaymentOption
source§impl Default for PremiumPaymentOption
impl Default for PremiumPaymentOption
source§fn default() -> PremiumPaymentOption
fn default() -> PremiumPaymentOption
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for PremiumPaymentOption
impl<'de> Deserialize<'de> for PremiumPaymentOption
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<PremiumPaymentOption> for PremiumPaymentOption
impl PartialEq<PremiumPaymentOption> for PremiumPaymentOption
source§fn eq(&self, other: &PremiumPaymentOption) -> bool
fn eq(&self, other: &PremiumPaymentOption) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for PremiumPaymentOption
impl Serialize for PremiumPaymentOption
impl StructuralPartialEq for PremiumPaymentOption
Auto Trait Implementations§
impl RefUnwindSafe for PremiumPaymentOption
impl Send for PremiumPaymentOption
impl Sync for PremiumPaymentOption
impl Unpin for PremiumPaymentOption
impl UnwindSafe for PremiumPaymentOption
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