Struct teloxide::types::LabeledPrice
source · Expand description
This object represents a portion of the price for goods or services.
Fields§
§label: String
Portion label.
amount: i32
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).
Implementations§
source§impl LabeledPrice
impl LabeledPrice
pub fn new<S>(label: S, amount: i32) -> LabeledPricewhere
S: Into<String>,
pub fn label<S>(self, val: S) -> LabeledPricewhere
S: Into<String>,
pub fn amount(self, val: i32) -> LabeledPrice
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<'de> Deserialize<'de> for LabeledPrice
impl<'de> Deserialize<'de> for LabeledPrice
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<LabeledPrice, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<LabeledPrice, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for LabeledPrice
impl Hash for LabeledPrice
source§impl PartialEq<LabeledPrice> for LabeledPrice
impl PartialEq<LabeledPrice> for LabeledPrice
source§fn eq(&self, other: &LabeledPrice) -> bool
fn eq(&self, other: &LabeledPrice) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for LabeledPrice
impl Serialize for LabeledPrice
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for LabeledPrice
impl StructuralEq for LabeledPrice
impl StructuralPartialEq for LabeledPrice
Auto Trait Implementations§
impl RefUnwindSafe for LabeledPrice
impl Send for LabeledPrice
impl Sync for LabeledPrice
impl Unpin for LabeledPrice
impl UnwindSafe for LabeledPrice
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.