pub struct UseTransferChecked<'a> {
pub mint: &'a NoStdAccountInfo,
pub decimals: u8,
pub additional_accounts: Option<&'a [NoStdAccountInfo]>,
}Expand description
Optional arguments for Transfer, which enables the transfer checked instruction instead of the deprecated transfer instruction.
Fields§
§mint: &'a NoStdAccountInfo§decimals: u8§additional_accounts: Option<&'a [NoStdAccountInfo]>These additional accounts apply to the transfer checked instruction on the Token Extensions program. Examples of these accounts may include signers of the multisig extension or accounts needed for transfer hook CPI (which is performed by the Token Extensions program).
§Notes
If the “alloc” feature is disabled, only a max number specified by MAX_ADDITIONAL_ACCOUNTS_NOALLOC can be passed in and will panic if more are passed into Transfer.
If additional accounts happen to be passed in for a transfer checked call to the legacy Token program, the program will disregard these accounts when performing CPI.
Trait Implementations§
Source§impl<'a> Clone for UseTransferChecked<'a>
impl<'a> Clone for UseTransferChecked<'a>
impl<'a> Eq for UseTransferChecked<'a>
Source§impl<'a> PartialEq for UseTransferChecked<'a>
impl<'a> PartialEq for UseTransferChecked<'a>
impl<'a> StructuralPartialEq for UseTransferChecked<'a>
Auto Trait Implementations§
impl<'a> !Send for UseTransferChecked<'a>
impl<'a> !Sync for UseTransferChecked<'a>
impl<'a> Freeze for UseTransferChecked<'a>
impl<'a> RefUnwindSafe for UseTransferChecked<'a>
impl<'a> Unpin for UseTransferChecked<'a>
impl<'a> UnsafeUnpin for UseTransferChecked<'a>
impl<'a> UnwindSafe for UseTransferChecked<'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
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<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