pub struct SuggestedPostPriceBuilder {
pub currency: String,
pub amount: i64,
}Expand description
Describes the price of a suggested post.
Fields§
§currency: StringCurrency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars or “TON” for toncoins
amount: i64The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000.
Implementations§
Source§impl SuggestedPostPriceBuilder
impl SuggestedPostPriceBuilder
pub fn new(currency: String, amount: i64) -> Self
Sourcepub fn set_currency(self, currency: String) -> Self
pub fn set_currency(self, currency: String) -> Self
Currency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars or “TON” for toncoins
Sourcepub fn set_amount(self, amount: i64) -> Self
pub fn set_amount(self, amount: i64) -> Self
The amount of the currency that will be paid for the post in the smallest units of the currency, i.e. Telegram Stars or nanotoncoins. Currently, price in Telegram Stars must be between 5 and 100000, and price in nanotoncoins must be between 10000000 and 10000000000000.
pub fn build(self) -> SuggestedPostPrice
Trait Implementations§
Source§impl Clone for SuggestedPostPriceBuilder
impl Clone for SuggestedPostPriceBuilder
Source§fn clone(&self) -> SuggestedPostPriceBuilder
fn clone(&self) -> SuggestedPostPriceBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SuggestedPostPriceBuilder
impl Debug for SuggestedPostPriceBuilder
Source§impl Default for SuggestedPostPriceBuilder
impl Default for SuggestedPostPriceBuilder
Source§fn default() -> SuggestedPostPriceBuilder
fn default() -> SuggestedPostPriceBuilder
Source§impl<'de> Deserialize<'de> for SuggestedPostPriceBuilder
impl<'de> Deserialize<'de> for SuggestedPostPriceBuilder
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>,
Source§impl Hash for SuggestedPostPriceBuilder
impl Hash for SuggestedPostPriceBuilder
Source§impl Ord for SuggestedPostPriceBuilder
impl Ord for SuggestedPostPriceBuilder
Source§fn cmp(&self, other: &SuggestedPostPriceBuilder) -> Ordering
fn cmp(&self, other: &SuggestedPostPriceBuilder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for SuggestedPostPriceBuilder
impl PartialOrd for SuggestedPostPriceBuilder
impl Eq for SuggestedPostPriceBuilder
impl StructuralPartialEq for SuggestedPostPriceBuilder
Auto Trait Implementations§
impl Freeze for SuggestedPostPriceBuilder
impl RefUnwindSafe for SuggestedPostPriceBuilder
impl Send for SuggestedPostPriceBuilder
impl Sync for SuggestedPostPriceBuilder
impl Unpin for SuggestedPostPriceBuilder
impl UnsafeUnpin for SuggestedPostPriceBuilder
impl UnwindSafe for SuggestedPostPriceBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.