pub struct SendGiftChat {
pub chat_id: Recipient,
pub gift_id: GiftId,
pub pay_for_upgrade: Option<bool>,
pub text: Option<String>,
pub text_parse_mode: Option<ParseMode>,
pub text_entities: Option<Vec<MessageEntity>>,
}Expand description
Sends a gift to the given channel chat. The gift can’t be converted to Telegram Stars by the receiver. Returns True on success.
See also: SendGift
Fields§
§chat_id: RecipientUnique identifier for the chat or username of the channel that will receive the gift
gift_id: GiftIdIdentifier of the gift
pay_for_upgrade: Option<bool>Pass true to pay for the gift upgrade from the bot’s balance, thereby making the upgrade free for the receiver
text: Option<String>Text that will be shown along with the gift; 0-255 characters
text_parse_mode: Option<ParseMode>Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored
text_entities: Option<Vec<MessageEntity>>List of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.
Implementations§
Source§impl SendGiftChat
impl SendGiftChat
Trait Implementations§
Source§impl Clone for SendGiftChat
impl Clone for SendGiftChat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SendGiftChat
impl Debug for SendGiftChat
Source§impl Hash for SendGiftChat
impl Hash for SendGiftChat
Source§impl PartialEq for SendGiftChat
impl PartialEq for SendGiftChat
Source§impl Payload for SendGiftChat
impl Payload for SendGiftChat
Source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
GetUpdates with
big timeout), the minimum timeout that should be used.Source§impl Serialize for SendGiftChat
impl Serialize for SendGiftChat
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 Eq for SendGiftChat
impl StructuralPartialEq for SendGiftChat
Auto Trait Implementations§
impl Freeze for SendGiftChat
impl RefUnwindSafe for SendGiftChat
impl Send for SendGiftChat
impl Sync for SendGiftChat
impl Unpin for SendGiftChat
impl UnwindSafe for SendGiftChat
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§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.Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
Source§fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<P> SendGiftChatSetters for Pwhere
P: HasPayload<Payload = SendGiftChat>,
impl<P> SendGiftChatSetters for Pwhere
P: HasPayload<Payload = SendGiftChat>,
Source§fn pay_for_upgrade(self, value: bool) -> Self
fn pay_for_upgrade(self, value: bool) -> Self
pay_for_upgrade field.Source§fn text_parse_mode(self, value: ParseMode) -> Self
fn text_parse_mode(self, value: ParseMode) -> Self
text_parse_mode field.Source§fn text_entities<T>(self, value: T) -> Self
fn text_entities<T>(self, value: T) -> Self
text_entities field.