pub struct TransferGift { /* private fields */ }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.
Implementations§
Source§impl TransferGift
impl TransferGift
Sourcepub fn new<A, B>(
business_connection_id: A,
owned_gift_id: B,
new_owner_chat_id: Integer,
) -> Self
pub fn new<A, B>( business_connection_id: A, owned_gift_id: B, new_owner_chat_id: Integer, ) -> Self
Creates a new TransferGift.
§Arguments
business_connection_id- Unique identifier of the business connection.owned_gift_id- Unique identifier of the regular gift that should be transferred.new_owner_chat_id- Unique identifier of the chat which will own the gift; the chat must be active in the last 24 hours.
Sourcepub fn with_star_count(self, value: Integer) -> Self
pub fn with_star_count(self, value: Integer) -> Self
Sets a new star count
§Arguments
value- 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.
Trait Implementations§
Source§impl Clone for TransferGift
impl Clone for TransferGift
Source§fn clone(&self) -> TransferGift
fn clone(&self) -> TransferGift
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Method for TransferGift
impl Method 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 UnsafeUnpin 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