Struct botapi::gen_types::ChatBoostSourceGiveaway
source · pub struct ChatBoostSourceGiveaway {
pub source: String,
pub giveaway_message_id: i64,
pub user: Option<BoxWrapper<Unbox<User>>>,
pub is_unclaimed: Option<bool>,
}
Expand description
The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.
Fields§
§source: String
Source of the boost, always “giveaway”
giveaway_message_id: i64
Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn’t sent yet.
user: Option<BoxWrapper<Unbox<User>>>
Optional. User that won the prize in the giveaway if any
is_unclaimed: Option<bool>
Optional. True, if the giveaway was completed, but there was no user to win the prize
Implementations§
source§impl ChatBoostSourceGiveaway
impl ChatBoostSourceGiveaway
pub fn noskip(self) -> NoSkipChatBoostSourceGiveaway
source§impl ChatBoostSourceGiveaway
impl ChatBoostSourceGiveaway
pub fn new(source: String, giveaway_message_id: i64) -> Self
sourcepub fn get_source<'a>(&'a self) -> &'a str
pub fn get_source<'a>(&'a self) -> &'a str
Source of the boost, always “giveaway”
sourcepub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self
pub fn set_source<'a>(&'a mut self, source: String) -> &'a mut Self
Source of the boost, always “giveaway”
sourcepub fn get_giveaway_message_id<'a>(&'a self) -> i64
pub fn get_giveaway_message_id<'a>(&'a self) -> i64
Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn’t sent yet.
sourcepub fn set_giveaway_message_id<'a>(
&'a mut self,
giveaway_message_id: i64,
) -> &'a mut Self
pub fn set_giveaway_message_id<'a>( &'a mut self, giveaway_message_id: i64, ) -> &'a mut Self
Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn’t sent yet.
sourcepub fn get_user<'a>(&'a self) -> Option<&'a User>
pub fn get_user<'a>(&'a self) -> Option<&'a User>
Optional. User that won the prize in the giveaway if any
sourcepub fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self
pub fn set_user<'a>(&'a mut self, user: Option<User>) -> &'a mut Self
Optional. User that won the prize in the giveaway if any
sourcepub fn get_is_unclaimed<'a>(&'a self) -> Option<bool>
pub fn get_is_unclaimed<'a>(&'a self) -> Option<bool>
Optional. True, if the giveaway was completed, but there was no user to win the prize
sourcepub fn set_is_unclaimed<'a>(
&'a mut self,
is_unclaimed: Option<bool>,
) -> &'a mut Self
pub fn set_is_unclaimed<'a>( &'a mut self, is_unclaimed: Option<bool>, ) -> &'a mut Self
Optional. True, if the giveaway was completed, but there was no user to win the prize
Trait Implementations§
source§impl Clone for ChatBoostSourceGiveaway
impl Clone for ChatBoostSourceGiveaway
source§fn clone(&self) -> ChatBoostSourceGiveaway
fn clone(&self) -> ChatBoostSourceGiveaway
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ChatBoostSourceGiveaway
impl Debug for ChatBoostSourceGiveaway
source§impl Default for ChatBoostSourceGiveaway
impl Default for ChatBoostSourceGiveaway
source§fn default() -> ChatBoostSourceGiveaway
fn default() -> ChatBoostSourceGiveaway
source§impl<'de> Deserialize<'de> for ChatBoostSourceGiveaway
impl<'de> Deserialize<'de> for ChatBoostSourceGiveaway
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>,
source§impl From<BoxWrapper<Box<ChatBoostSourceGiveaway>>> for ChatBoostSourceGiveaway
impl From<BoxWrapper<Box<ChatBoostSourceGiveaway>>> for ChatBoostSourceGiveaway
source§fn from(t: BoxWrapper<Box<ChatBoostSourceGiveaway>>) -> Self
fn from(t: BoxWrapper<Box<ChatBoostSourceGiveaway>>) -> Self
source§impl From<BoxWrapper<Unbox<ChatBoostSourceGiveaway>>> for ChatBoostSourceGiveaway
impl From<BoxWrapper<Unbox<ChatBoostSourceGiveaway>>> for ChatBoostSourceGiveaway
source§fn from(t: BoxWrapper<Unbox<ChatBoostSourceGiveaway>>) -> Self
fn from(t: BoxWrapper<Unbox<ChatBoostSourceGiveaway>>) -> Self
source§impl From<NoSkipChatBoostSourceGiveaway> for ChatBoostSourceGiveaway
impl From<NoSkipChatBoostSourceGiveaway> for ChatBoostSourceGiveaway
source§fn from(t: NoSkipChatBoostSourceGiveaway) -> Self
fn from(t: NoSkipChatBoostSourceGiveaway) -> Self
source§impl Hash for ChatBoostSourceGiveaway
impl Hash for ChatBoostSourceGiveaway
source§impl Into<NoSkipChatBoostSourceGiveaway> for ChatBoostSourceGiveaway
impl Into<NoSkipChatBoostSourceGiveaway> for ChatBoostSourceGiveaway
source§fn into(self) -> NoSkipChatBoostSourceGiveaway
fn into(self) -> NoSkipChatBoostSourceGiveaway
source§impl Ord for ChatBoostSourceGiveaway
impl Ord for ChatBoostSourceGiveaway
source§fn cmp(&self, other: &ChatBoostSourceGiveaway) -> Ordering
fn cmp(&self, other: &ChatBoostSourceGiveaway) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ChatBoostSourceGiveaway
impl PartialEq for ChatBoostSourceGiveaway
source§fn eq(&self, other: &ChatBoostSourceGiveaway) -> bool
fn eq(&self, other: &ChatBoostSourceGiveaway) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ChatBoostSourceGiveaway
impl PartialOrd for ChatBoostSourceGiveaway
source§fn partial_cmp(&self, other: &ChatBoostSourceGiveaway) -> Option<Ordering>
fn partial_cmp(&self, other: &ChatBoostSourceGiveaway) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ChatBoostSourceGiveaway
impl Serialize for ChatBoostSourceGiveaway
impl Eq for ChatBoostSourceGiveaway
impl StructuralPartialEq for ChatBoostSourceGiveaway
Auto Trait Implementations§
impl Freeze for ChatBoostSourceGiveaway
impl RefUnwindSafe for ChatBoostSourceGiveaway
impl Send for ChatBoostSourceGiveaway
impl Sync for ChatBoostSourceGiveaway
impl Unpin for ChatBoostSourceGiveaway
impl UnwindSafe for ChatBoostSourceGiveaway
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.