pub struct Giveaway {
pub chats: Vec<Chat>,
pub winners_selection_date: DateTime<Utc>,
pub winner_count: u32,
pub only_new_members: bool,
pub has_public_winners: bool,
pub prize_description: Option<String>,
pub country_codes: Option<Vec<CountryCode>>,
pub prize_star_count: Option<u32>,
pub premium_subscription_month_count: Option<u8>,
}Expand description
This object represents a message about a scheduled giveaway.
Fields§
§chats: Vec<Chat>The list of chats which the user must join to participate in the giveaway.
winners_selection_date: DateTime<Utc>Point in time (Unix timestamp) when winners of the giveaway will be selected
winner_count: u32The number of users which are supposed to be selected as winners of the giveaway
only_new_members: booltrue, if only users who join the chats after the giveaway started
should be eligible to win
has_public_winners: booltrue, if the list of giveaway winners will be visible to everyone
prize_description: Option<String>Description of additional giveaway prize
country_codes: Option<Vec<CountryCode>>A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.
prize_star_count: Option<u32>The number of Telegram Stars to be split between giveaway winners
The number of months the Telegram Premium subscription won from the giveaway will be active for
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Giveaway
impl<'de> Deserialize<'de> for Giveaway
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Giveaway, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Giveaway, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Giveaway
impl Serialize for Giveaway
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 Giveaway
Auto Trait Implementations§
impl Forget for Giveaway
impl Freeze for Giveawaywhere
*const u8 is !null: Freeze,
PhantomData<Chat>: Freeze,
NonZero<i32>: Freeze,
Utc: Freeze,
PhantomData<u8>: Freeze,
PhantomData<CountryCode>: Freeze,
impl Move for Giveaway
impl RefUnwindSafe for Giveaway
impl Send for Giveaway
impl Sync for Giveaway
impl Unpin for Giveaway
impl UnsafeUnpin for Giveawaywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Chat>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<CountryCode>: UnsafeUnpin,
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
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<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