pub struct GiftInfo {
pub gift: Gift,
pub owned_gift_id: Option<OwnedGiftId>,
pub convert_star_count: Option<u32>,
pub prepaid_upgrade_star_count: Option<u32>,
pub can_be_upgraded: bool,
pub is_upgrade_separate: bool,
pub unique_gift_number: Option<u64>,
pub text: Option<String>,
pub entities: Option<Vec<MessageEntity>>,
pub is_private: bool,
}Expand description
Describes a service message about a regular gift that was sent or received.
Fields§
§gift: GiftInformation about the gift
owned_gift_id: Option<OwnedGiftId>Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts
convert_star_count: Option<u32>Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible
prepaid_upgrade_star_count: Option<u32>Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift
can_be_upgraded: booltrue, if the gift can be upgraded to a unique gift
is_upgrade_separate: booltrue, if the gift can only be upgraded on its own, and the option to
upgrade the gift and add more Telegram Stars to the upgrade
simultaneously isn’t available
unique_gift_number: Option<u64>Number of the corresponding unique gift, if the gift is upgraded and the number is known
text: Option<String>Text of the message that was added to the gift
entities: Option<Vec<MessageEntity>>Special entities that appear in the text
is_private: booltrue, if the sender and gift text are shown only to the gift receiver;
otherwise, everyone will be able to see them
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GiftInfo
impl<'de> Deserialize<'de> for GiftInfo
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GiftInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GiftInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for GiftInfo
Source§impl Serialize for GiftInfo
impl Serialize for GiftInfo
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,
impl StructuralPartialEq for GiftInfo
Auto Trait Implementations§
impl Freeze for GiftInfo
impl RefUnwindSafe for GiftInfo
impl Send for GiftInfo
impl Sync for GiftInfo
impl Unpin for GiftInfo
impl UnsafeUnpin for GiftInfo
impl UnwindSafe for GiftInfo
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> Erasable for T
impl<T> Erasable for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more