pub struct Transfer<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> Transfer<'a>
impl<'a> Transfer<'a>
Sourcepub fn new(
svm: &'a mut LiteSVM,
payer: &'a Keypair,
mint: &'a Pubkey,
destination: &'a Pubkey,
amount: u64,
) -> Self
pub fn new( svm: &'a mut LiteSVM, payer: &'a Keypair, mint: &'a Pubkey, destination: &'a Pubkey, amount: u64, ) -> Self
Creates a new instance of transfer instruction.
Sourcepub fn token_program_id(self, program_id: &'a Pubkey) -> Self
pub fn token_program_id(self, program_id: &'a Pubkey) -> Self
Sets the token program id for the instruction.
Sourcepub fn owner(self, owner: &'a Keypair) -> Self
pub fn owner(self, owner: &'a Keypair) -> Self
Sets the owner of the account with single owner.
Sourcepub fn multisig(self, multisig: &'a Pubkey, signers: &'a [&'a Keypair]) -> Self
pub fn multisig(self, multisig: &'a Pubkey, signers: &'a [&'a Keypair]) -> Self
Sets the owner of the account with multisig owner.
Sourcepub fn send(self) -> Result<(), FailedTransactionMetadata>
pub fn send(self) -> Result<(), FailedTransactionMetadata>
Sends the transaction.
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> !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
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 more