pub struct PremiumGiftCodeInfo {
pub creator_id: Option<MessageSender>,
pub creation_date: i32,
pub is_from_giveaway: bool,
pub giveaway_message_id: i64,
pub month_count: i32,
pub user_id: i64,
pub use_date: i32,
}
Expand description
Contains information about a Telegram Premium gift code
Fields§
§creator_id: Option<MessageSender>
Identifier of a chat or a user that created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creator_id from the message can be used
creation_date: i32
Point in time (Unix timestamp) when the code was created
is_from_giveaway: bool
True, if the gift code was created for a giveaway
giveaway_message_id: i64
Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message
month_count: i32
Number of months the Telegram Premium subscription will be active after code activation
user_id: i64
Identifier of a user for which the code was created; 0 if none
use_date: i32
Point in time (Unix timestamp) when the code was activated; 0 if none
Trait Implementations§
Source§impl Clone for PremiumGiftCodeInfo
impl Clone for PremiumGiftCodeInfo
Source§fn clone(&self) -> PremiumGiftCodeInfo
fn clone(&self) -> PremiumGiftCodeInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PremiumGiftCodeInfo
impl Debug for PremiumGiftCodeInfo
Source§impl Default for PremiumGiftCodeInfo
impl Default for PremiumGiftCodeInfo
Source§fn default() -> PremiumGiftCodeInfo
fn default() -> PremiumGiftCodeInfo
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PremiumGiftCodeInfo
impl<'de> Deserialize<'de> for PremiumGiftCodeInfo
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
Source§impl PartialEq for PremiumGiftCodeInfo
impl PartialEq for PremiumGiftCodeInfo
Source§impl Serialize for PremiumGiftCodeInfo
impl Serialize for PremiumGiftCodeInfo
impl StructuralPartialEq for PremiumGiftCodeInfo
Auto Trait Implementations§
impl Freeze for PremiumGiftCodeInfo
impl RefUnwindSafe for PremiumGiftCodeInfo
impl Send for PremiumGiftCodeInfo
impl Sync for PremiumGiftCodeInfo
impl Unpin for PremiumGiftCodeInfo
impl UnwindSafe for PremiumGiftCodeInfo
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