pub struct TransferGift {
pub business_connection_id: BusinessConnectionId,
pub owned_gift_id: OwnedGiftId,
pub new_owner_chat_id: ChatId,
pub star_count: Option<u32>,
}Expand description
Transfers an owned unique gift to another user. Requires the can_transfer_and_upgrade_gifts business bot right. Requires can_transfer_stars business bot right if the transfer is paid. Returns true on success.
Fields§
§business_connection_id: BusinessConnectionIdUnique identifier of the business connection
owned_gift_id: OwnedGiftIdUnique identifier of the regular gift that should be converted to Telegram Stars
new_owner_chat_id: ChatIdUnique identifier of the chat which will own the gift. The chat must be active in the last 24 hours
star_count: Option<u32>The amount of Telegram Stars that will be paid for the transfer from the business account balance. If positive, then the can_transfer_stars business bot right is required
Implementations§
Source§impl TransferGift
impl TransferGift
pub fn new( business_connection_id: BusinessConnectionId, owned_gift_id: OwnedGiftId, new_owner_chat_id: impl Into<ChatId>, ) -> Self
Trait Implementations§
Source§impl Clone for TransferGift
impl Clone for TransferGift
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 TransferGift
impl Debug for TransferGift
Source§impl Hash for TransferGift
impl Hash for TransferGift
Source§impl PartialEq for TransferGift
impl PartialEq for TransferGift
Source§impl Payload for TransferGift
impl Payload for TransferGift
Source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates with
big timeout), the minimum timeout that should be used.Source§impl Serialize for TransferGift
impl Serialize for TransferGift
impl Eq for TransferGift
impl StructuralPartialEq for TransferGift
Auto Trait Implementations§
impl Freeze for TransferGift
impl RefUnwindSafe for TransferGift
impl Send for TransferGift
impl Sync for TransferGift
impl Unpin for TransferGift
impl UnwindSafe for TransferGift
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Gain mutable access to the underlying payload.
Source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
Gain immutable access to the underlying 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>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<P> TransferGiftSetters for Pwhere
P: HasPayload<Payload = TransferGift>,
impl<P> TransferGiftSetters for Pwhere
P: HasPayload<Payload = TransferGift>,
Source§fn business_connection_id(self, value: BusinessConnectionId) -> Self
fn business_connection_id(self, value: BusinessConnectionId) -> Self
Setter for
business_connection_id field.Source§fn owned_gift_id(self, value: OwnedGiftId) -> Self
fn owned_gift_id(self, value: OwnedGiftId) -> Self
Setter for
owned_gift_id field.Source§fn new_owner_chat_id<T>(self, value: T) -> Self
fn new_owner_chat_id<T>(self, value: T) -> Self
Setter for
new_owner_chat_id field.Source§fn star_count(self, value: u32) -> Self
fn star_count(self, value: u32) -> Self
Setter for
star_count field.