pub struct OwnedGiftRegular {
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 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
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 · 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>,
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 Eq for OwnedGiftRegular
impl StructuralPartialEq for OwnedGiftRegular
Auto Trait Implementations§
impl Freeze for OwnedGiftRegular
impl RefUnwindSafe for OwnedGiftRegular
impl Send for OwnedGiftRegular
impl Sync for OwnedGiftRegular
impl Unpin for OwnedGiftRegular
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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