Struct carapax::types::ChatBoostSourceGiveaway
source · pub struct ChatBoostSourceGiveaway {
pub giveaway_message_id: i64,
pub is_unclaimed: Option<bool>,
pub user: Option<User>,
}
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§
§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.
is_unclaimed: Option<bool>
Whether the giveaway was completed, but there was no user to win the prize.
user: Option<User>
User that won the prize in the giveaway if any.
Implementations§
source§impl ChatBoostSourceGiveaway
impl ChatBoostSourceGiveaway
sourcepub fn new(giveaway_message_id: i64) -> ChatBoostSourceGiveaway
pub fn new(giveaway_message_id: i64) -> ChatBoostSourceGiveaway
Creates a new ChatBoostSourceGiveaway
.
§Arguments
giveaway_message_id
- Identifier of a message in the chat with the giveaway.
sourcepub fn with_is_unclaimed(self, value: bool) -> ChatBoostSourceGiveaway
pub fn with_is_unclaimed(self, value: bool) -> ChatBoostSourceGiveaway
Sets a new value for an is_unclaimed
flag.
§Arguments
value
- Whether the giveaway was completed, but there was no user to win the prize.
sourcepub fn with_user(self, value: User) -> ChatBoostSourceGiveaway
pub fn with_user(self, value: User) -> ChatBoostSourceGiveaway
Trait Implementations§
source§impl Clone for ChatBoostSourceGiveaway
impl Clone for ChatBoostSourceGiveaway
source§fn clone(&self) -> ChatBoostSourceGiveaway
fn clone(&self) -> ChatBoostSourceGiveaway
Returns a copy 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 ChatBoostSourceGiveaway
impl Debug for ChatBoostSourceGiveaway
source§impl<'de> Deserialize<'de> for ChatBoostSourceGiveaway
impl<'de> Deserialize<'de> for ChatBoostSourceGiveaway
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ChatBoostSourceGiveaway, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ChatBoostSourceGiveaway, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ChatBoostSourceGiveaway
impl PartialEq for ChatBoostSourceGiveaway
source§fn eq(&self, other: &ChatBoostSourceGiveaway) -> bool
fn eq(&self, other: &ChatBoostSourceGiveaway) -> bool
This method tests for
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
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ChatBoostSourceGiveaway
impl Serialize for ChatBoostSourceGiveaway
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,
Serialize this value into the given Serde serializer. Read more
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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