pub struct Transfer<'a> {
pub from: &'a AccountView,
pub to: &'a AccountView,
pub authority: &'a AccountView,
pub amount: u64,
}Expand description
Transfer tokens from one Token account to another.
§Accounts:
[WRITE]Sender account[WRITE]Recipient account[SIGNER]Authority account
Fields§
§from: &'a AccountViewSender account.
to: &'a AccountViewRecipient account.
Authority account.
amount: u64Amount of micro-tokens to transfer.
Implementations§
Source§impl Transfer<'_>
impl Transfer<'_>
pub fn invoke(&self) -> Result<(), ProgramError>
pub fn invoke_signed( &self, signers: &[Signer<'_, '_>], ) -> Result<(), ProgramError>
Auto Trait Implementations§
impl<'a> Freeze for Transfer<'a>
impl<'a> RefUnwindSafe for Transfer<'a>
impl<'a> !Send for Transfer<'a>
impl<'a> !Sync for Transfer<'a>
impl<'a> Unpin for Transfer<'a>
impl<'a> UnsafeUnpin for Transfer<'a>
impl<'a> UnwindSafe for Transfer<'a>
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