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
Source§fn clone(&self) -> SendGiftChat ⓘ
fn clone(&self) -> SendGiftChat ⓘ
1.0.0 (const: unstable) · 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
impl Eq 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§const NAME: &'static str = "SendGiftChat"
const NAME: &'static str = "SendGiftChat"
EditMessageTextInline).Source§const TELEGRAM_METHOD: &'static str = "SendGift"
const TELEGRAM_METHOD: &'static str = "SendGift"
EditMessageText). Defaults to the payload name.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 StructuralPartialEq for SendGiftChat
Auto Trait Implementations§
impl Forget for SendGiftChat
impl Freeze for SendGiftChat
impl Move for SendGiftChat
impl RefUnwindSafe for SendGiftChat
impl Send for SendGiftChatwhere
RawVecInner: Send,
impl Sync for SendGiftChatwhere
RawVecInner: Sync,
impl Unpin for SendGiftChat
impl UnsafeUnpin for SendGiftChatwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<MessageEntity>: UnsafeUnpin,
impl UnwindSafe for SendGiftChatwhere
RawVecInner: UnwindSafe,
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,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
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 moreimpl<T> MaybeSend for T
impl<T> MaybeSync for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> 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.