Struct botapi::gen_types::LabeledPrice
source · pub struct LabeledPrice { /* private fields */ }
Expand description
This object represents a portion of the price for goods or services.
Implementations§
source§impl LabeledPrice
impl LabeledPrice
pub fn noskip(self) -> NoSkipLabeledPrice
source§impl LabeledPrice
impl LabeledPrice
pub fn new(label: String, amount: i64) -> Self
sourcepub fn get_label_ref<'a>(&'a self) -> &'a str
pub fn get_label_ref<'a>(&'a self) -> &'a str
Portion label
sourcepub fn get_amount<'a>(&'a self) -> i64
pub fn get_amount<'a>(&'a self) -> i64
Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
sourcepub fn get_amount_ref<'a>(&'a self) -> i64
pub fn get_amount_ref<'a>(&'a self) -> i64
Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
Trait Implementations§
source§impl Clone for LabeledPrice
impl Clone for LabeledPrice
source§fn clone(&self) -> LabeledPrice
fn clone(&self) -> LabeledPrice
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 LabeledPrice
impl Debug for LabeledPrice
source§impl Default for LabeledPrice
impl Default for LabeledPrice
source§fn default() -> LabeledPrice
fn default() -> LabeledPrice
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for LabeledPrice
impl<'de> Deserialize<'de> for LabeledPrice
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 From<NoSkipLabeledPrice> for LabeledPrice
impl From<NoSkipLabeledPrice> for LabeledPrice
source§fn from(t: NoSkipLabeledPrice) -> Self
fn from(t: NoSkipLabeledPrice) -> Self
Converts to this type from the input type.
source§impl Into<NoSkipLabeledPrice> for LabeledPrice
impl Into<NoSkipLabeledPrice> for LabeledPrice
source§fn into(self) -> NoSkipLabeledPrice
fn into(self) -> NoSkipLabeledPrice
Converts this type into the (usually inferred) input type.