pub struct Gift {
pub id: String,
pub sticker: Sticker,
pub star_count: u32,
pub upgrade_star_count: Option<u32>,
pub total_count: Option<u32>,
pub remaining_count: Option<u32>,
}Expand description
A Telegram gift that can be sent to users.
Retrieve available gifts with getAvailableGifts.
Fields§
§id: StringUnique gift identifier.
sticker: StickerThe sticker that represents this gift.
star_count: u32Number of Telegram Stars that must be paid to send this gift.
upgrade_star_count: Option<u32>Number of Telegram Stars required to upgrade this gift to a unique gift.
total_count: Option<u32>Total number of gifts of this type that can be sent; None if unlimited.
remaining_count: Option<u32>Number of remaining gifts of this type that can be sent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Gift
impl<'de> Deserialize<'de> for Gift
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
Auto Trait Implementations§
impl Freeze for Gift
impl RefUnwindSafe for Gift
impl Send for Gift
impl Sync for Gift
impl Unpin for Gift
impl UnsafeUnpin for Gift
impl UnwindSafe for Gift
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