pub struct OwnedGiftRegular {Show 14 fields
pub gift: Gift,
pub owned_gift_id: Option<OwnedGiftId>,
pub sender_user: Option<User>,
pub send_date: DateTime<Utc>,
pub text: Option<String>,
pub entities: Option<Vec<MessageEntity>>,
pub is_private: bool,
pub is_saved: bool,
pub can_be_upgraded: bool,
pub is_upgrade_separate: bool,
pub unique_gift_number: Option<u64>,
pub was_refunded: bool,
pub convert_star_count: Option<u32>,
pub prepaid_upgrade_star_count: Option<u32>,
}Expand description
Describes a regular gift owned by a user or a chat.
Fields§
§gift: GiftInformation about the regular gift
owned_gift_id: Option<OwnedGiftId>Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only
sender_user: Option<User>Sender of the gift if it is a known user
send_date: DateTime<Utc>Date the gift was sent in Unix time
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
is_saved: booltrue, if the gift is displayed on the account’s profile page; for
gifts received on behalf of business accounts only
can_be_upgraded: booltrue, if the gift can be upgraded to a unique gift; for gifts received
on behalf of business accounts only
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
was_refunded: booltrue, if the gift was refunded and isn’t available anymore
convert_star_count: Option<u32>Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars
prepaid_upgrade_star_count: Option<u32>Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift
Trait Implementations§
Source§impl Clone for OwnedGiftRegular
impl Clone for OwnedGiftRegular
Source§fn clone(&self) -> OwnedGiftRegular
fn clone(&self) -> OwnedGiftRegular
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OwnedGiftRegular
impl Debug for OwnedGiftRegular
Source§impl<'de> Deserialize<'de> for OwnedGiftRegular
impl<'de> Deserialize<'de> for OwnedGiftRegular
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OwnedGiftRegular, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OwnedGiftRegular, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for OwnedGiftRegular
Source§impl Hash for OwnedGiftRegular
impl Hash for OwnedGiftRegular
Source§impl PartialEq for OwnedGiftRegular
impl PartialEq for OwnedGiftRegular
Source§impl Serialize for OwnedGiftRegular
impl Serialize for OwnedGiftRegular
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 OwnedGiftRegular
Auto Trait Implementations§
impl Forget for OwnedGiftRegular
impl Freeze for OwnedGiftRegularwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
NonZero<i32>: Freeze,
Utc: Freeze,
PhantomData<MessageEntity>: Freeze,
impl Move for OwnedGiftRegular
impl RefUnwindSafe for OwnedGiftRegular
impl Send for OwnedGiftRegular
impl Sync for OwnedGiftRegular
impl Unpin for OwnedGiftRegular
impl UnsafeUnpin for OwnedGiftRegularwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
PhantomData<MessageEntity>: UnsafeUnpin,
impl UnwindSafe for OwnedGiftRegular
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Erasable for T
impl<T> Erasable for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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