#[non_exhaustive]pub struct Giveaway {
pub chats: Vec<Chat>,
pub winners_selection_date: i64,
pub winner_count: u32,
pub only_new_members: Option<bool>,
pub has_public_winners: Option<bool>,
pub prize_description: Option<String>,
pub country_codes: Option<Vec<String>>,
pub prize_star_count: Option<i64>,
pub premium_subscription_month_count: Option<u32>,
}Expand description
A scheduled giveaway.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.chats: Vec<Chat>The chats the user must join to take part.
winners_selection_date: i64Point in time when winners will be selected, as a Unix timestamp.
winner_count: u32Number of users who will be selected as winners.
only_new_members: Option<bool>true if only users who join the chats after the giveaway started
should be eligible.
has_public_winners: Option<bool>true if the list of winners will be visible to everyone.
prize_description: Option<String>Description of additional giveaway prizes.
country_codes: Option<Vec<String>>Two-letter ISO 3166-1 alpha-2 country codes of eligible users.
prize_star_count: Option<i64>Number of Telegram Stars to be split among winners; Star giveaways only.
Number of months the Telegram Premium subscription won will be active for; Premium giveaways only.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Giveaway
impl<'de> Deserialize<'de> for Giveaway
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 Giveaway
impl RefUnwindSafe for Giveaway
impl Send for Giveaway
impl Sync for Giveaway
impl Unpin for Giveaway
impl UnsafeUnpin for Giveaway
impl UnwindSafe for Giveaway
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