pub struct Token<T> { /* private fields */ }Implementations§
Source§impl<T> Token<T>where
T: SendTransaction + SimulateTransaction,
impl<T> Token<T>where
T: SendTransaction + SimulateTransaction,
pub fn new( client: Arc<dyn ProgramClient<T>>, program_id: &Address, address: &Address, decimals: Option<u8>, payer: Arc<dyn Signer>, ) -> Self
pub fn new_native( client: Arc<dyn ProgramClient<T>>, program_id: &Address, payer: Arc<dyn Signer>, ) -> Self
pub fn is_native(&self) -> bool
Sourcepub fn get_address(&self) -> &Address
pub fn get_address(&self) -> &Address
Get token address.
pub fn with_payer(self, payer: Arc<dyn Signer>) -> Self
pub fn with_nonce( self, nonce_account: &Address, nonce_authority: Arc<dyn Signer>, nonce_blockhash: &Hash, ) -> Self
pub fn with_transfer_hook_accounts( self, transfer_hook_accounts: Vec<AccountMeta>, ) -> Self
pub fn with_compute_unit_price(self, compute_unit_price: u64) -> Self
pub fn with_compute_unit_limit( self, compute_unit_limit: ComputeUnitLimit, ) -> Self
pub fn with_memo<M: AsRef<str>>(&self, memo: M, signers: Vec<Address>) -> &Self
pub async fn get_new_latest_blockhash(&self) -> TokenResult<Hash>
pub async fn simulate_ixs<S: Signers>( &self, token_instructions: &[Instruction], signing_keypairs: &S, ) -> TokenResult<T::SimulationOutput>
pub async fn process_ixs<S: Signers>( &self, token_instructions: &[Instruction], signing_keypairs: &S, ) -> TokenResult<T::Output>
pub async fn create_mint<'a, S: Signers>( &self, mint_authority: &'a Address, freeze_authority: Option<&'a Address>, extension_initialization_params: Vec<ExtensionInitializationParams>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Sourcepub async fn create_native_mint(
client: Arc<dyn ProgramClient<T>>,
program_id: &Address,
payer: Arc<dyn Signer>,
) -> TokenResult<Self>
pub async fn create_native_mint( client: Arc<dyn ProgramClient<T>>, program_id: &Address, payer: Arc<dyn Signer>, ) -> TokenResult<Self>
Create native mint
Sourcepub async fn create_multisig(
&self,
account: &dyn Signer,
multisig_members: &[&Address],
minimum_signers: u8,
) -> TokenResult<T::Output>
pub async fn create_multisig( &self, account: &dyn Signer, multisig_members: &[&Address], minimum_signers: u8, ) -> TokenResult<T::Output>
Create multisig
Sourcepub fn get_associated_token_address(&self, owner: &Address) -> Address
pub fn get_associated_token_address(&self, owner: &Address) -> Address
Get the address for the associated token account.
Sourcepub async fn create_associated_token_account(
&self,
owner: &Address,
) -> TokenResult<T::Output>
pub async fn create_associated_token_account( &self, owner: &Address, ) -> TokenResult<T::Output>
Create and initialize the associated account.
Sourcepub async fn create_auxiliary_token_account(
&self,
account: &dyn Signer,
owner: &Address,
) -> TokenResult<T::Output>
pub async fn create_auxiliary_token_account( &self, account: &dyn Signer, owner: &Address, ) -> TokenResult<T::Output>
Create and initialize a new token account.
Sourcepub async fn create_auxiliary_token_account_with_extension_space(
&self,
account: &dyn Signer,
owner: &Address,
extensions: Vec<ExtensionType>,
) -> TokenResult<T::Output>
pub async fn create_auxiliary_token_account_with_extension_space( &self, account: &dyn Signer, owner: &Address, extensions: Vec<ExtensionType>, ) -> TokenResult<T::Output>
Create and initialize a new token account.
Sourcepub async fn get_account(&self, account: Address) -> TokenResult<BaseAccount>
pub async fn get_account(&self, account: Address) -> TokenResult<BaseAccount>
Retrieve a raw account
Sourcepub async fn get_mint_info(&self) -> TokenResult<StateWithExtensionsOwned<Mint>>
pub async fn get_mint_info(&self) -> TokenResult<StateWithExtensionsOwned<Mint>>
Retrieve mint information.
Sourcepub async fn get_account_info(
&self,
account: &Address,
) -> TokenResult<StateWithExtensionsOwned<Account>>
pub async fn get_account_info( &self, account: &Address, ) -> TokenResult<StateWithExtensionsOwned<Account>>
Retrieve account information.
Sourcepub async fn get_or_create_associated_account_info(
&self,
owner: &Address,
) -> TokenResult<StateWithExtensionsOwned<Account>>
pub async fn get_or_create_associated_account_info( &self, owner: &Address, ) -> TokenResult<StateWithExtensionsOwned<Account>>
Retrieve the associated account or create one if not found.
Assign a new authority to the account.
Sourcepub async fn mint_to<S: Signers>(
&self,
destination: &Address,
authority: &Address,
amount: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn mint_to<S: Signers>( &self, destination: &Address, authority: &Address, amount: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Mint new tokens
Sourcepub async fn transfer<S: Signers>(
&self,
source: &Address,
destination: &Address,
authority: &Address,
amount: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn transfer<S: Signers>( &self, source: &Address, destination: &Address, authority: &Address, amount: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Transfer tokens to another account
Sourcepub async fn create_recipient_associated_account_and_transfer<S: Signers>(
&self,
source: &Address,
destination: &Address,
destination_owner: &Address,
authority: &Address,
amount: u64,
fee: Option<u64>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn create_recipient_associated_account_and_transfer<S: Signers>( &self, source: &Address, destination: &Address, destination_owner: &Address, authority: &Address, amount: u64, fee: Option<u64>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Transfer tokens to an associated account, creating it if it does not exist
Sourcepub async fn transfer_with_fee<S: Signers>(
&self,
source: &Address,
destination: &Address,
authority: &Address,
amount: u64,
fee: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn transfer_with_fee<S: Signers>( &self, source: &Address, destination: &Address, authority: &Address, amount: u64, fee: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Transfer tokens to another account, given an expected fee
Sourcepub async fn burn<S: Signers>(
&self,
source: &Address,
authority: &Address,
amount: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn burn<S: Signers>( &self, source: &Address, authority: &Address, amount: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Burn tokens from account
Sourcepub async fn approve<S: Signers>(
&self,
source: &Address,
delegate: &Address,
authority: &Address,
amount: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn approve<S: Signers>( &self, source: &Address, delegate: &Address, authority: &Address, amount: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Approve a delegate to spend tokens
Sourcepub async fn revoke<S: Signers>(
&self,
source: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn revoke<S: Signers>( &self, source: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Revoke a delegate
Sourcepub async fn close_account<S: Signers>(
&self,
account: &Address,
lamports_destination: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn close_account<S: Signers>( &self, account: &Address, lamports_destination: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Close an empty account and reclaim its lamports
Sourcepub async fn empty_and_close_account<S: Signers>(
&self,
account_to_close: &Address,
lamports_destination: &Address,
tokens_destination: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn empty_and_close_account<S: Signers>( &self, account_to_close: &Address, lamports_destination: &Address, tokens_destination: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Close an account, reclaiming its lamports and tokens
Sourcepub async fn freeze<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn freeze<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Freeze a token account
Sourcepub async fn thaw<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn thaw<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Thaw / unfreeze a token account
Sourcepub async fn wrap<S: Signers>(
&self,
account: &Address,
owner: &Address,
lamports: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn wrap<S: Signers>( &self, account: &Address, owner: &Address, lamports: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Wrap lamports into native account
Sourcepub async fn wrap_with_mutable_ownership<S: Signers>(
&self,
account: &Address,
owner: &Address,
lamports: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn wrap_with_mutable_ownership<S: Signers>( &self, account: &Address, owner: &Address, lamports: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Wrap lamports into a native account that can always have its ownership changed
Sourcepub async fn unwrap_lamports<S: Signers>(
&self,
source: &Address,
destination: &Address,
authority: &Address,
amount: Option<u64>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn unwrap_lamports<S: Signers>( &self, source: &Address, destination: &Address, authority: &Address, amount: Option<u64>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Unwrap lamports from native account
Sourcepub async fn sync_native(&self, account: &Address) -> TokenResult<T::Output>
pub async fn sync_native(&self, account: &Address) -> TokenResult<T::Output>
Sync native account lamports
Sourcepub async fn set_transfer_fee<S: Signers>(
&self,
authority: &Address,
transfer_fee_basis_points: u16,
maximum_fee: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn set_transfer_fee<S: Signers>( &self, authority: &Address, transfer_fee_basis_points: u16, maximum_fee: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Set transfer fee
Sourcepub async fn set_default_account_state<S: Signers>(
&self,
authority: &Address,
state: &AccountState,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn set_default_account_state<S: Signers>( &self, authority: &Address, state: &AccountState, signing_keypairs: &S, ) -> TokenResult<T::Output>
Set default account state on mint
Sourcepub async fn harvest_withheld_tokens_to_mint(
&self,
sources: &[&Address],
) -> TokenResult<T::Output>
pub async fn harvest_withheld_tokens_to_mint( &self, sources: &[&Address], ) -> TokenResult<T::Output>
Harvest withheld tokens to mint
Sourcepub async fn withdraw_withheld_tokens_from_mint<S: Signers>(
&self,
destination: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn withdraw_withheld_tokens_from_mint<S: Signers>( &self, destination: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Withdraw withheld tokens from mint
Sourcepub async fn withdraw_withheld_tokens_from_accounts<S: Signers>(
&self,
destination: &Address,
authority: &Address,
sources: &[&Address],
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn withdraw_withheld_tokens_from_accounts<S: Signers>( &self, destination: &Address, authority: &Address, sources: &[&Address], signing_keypairs: &S, ) -> TokenResult<T::Output>
Withdraw withheld tokens from accounts
Sourcepub async fn reallocate<S: Signers>(
&self,
account: &Address,
authority: &Address,
extension_types: &[ExtensionType],
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn reallocate<S: Signers>( &self, account: &Address, authority: &Address, extension_types: &[ExtensionType], signing_keypairs: &S, ) -> TokenResult<T::Output>
Reallocate a token account to be large enough for a set of
ExtensionTypes
Sourcepub async fn enable_required_transfer_memos<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn enable_required_transfer_memos<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Require memos on transfers into this account
Sourcepub async fn disable_required_transfer_memos<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn disable_required_transfer_memos<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Stop requiring memos on transfers into this account
Sourcepub async fn pause<S: Signers>(
&self,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn pause<S: Signers>( &self, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Pause transferring, minting, and burning on the mint
Sourcepub async fn resume<S: Signers>(
&self,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn resume<S: Signers>( &self, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Resume transferring, minting, and burning on the mint
Sourcepub async fn enable_cpi_guard<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn enable_cpi_guard<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Prevent unsafe usage of token account through CPI
Sourcepub async fn disable_cpi_guard<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn disable_cpi_guard<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Stop preventing unsafe usage of token account through CPI
Sourcepub async fn update_interest_rate<S: Signers>(
&self,
authority: &Address,
new_rate: i16,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn update_interest_rate<S: Signers>( &self, authority: &Address, new_rate: i16, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update interest rate
Sourcepub async fn update_multiplier<S: Signers>(
&self,
authority: &Address,
new_multiplier: f64,
new_multiplier_effective_timestamp: i64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn update_multiplier<S: Signers>( &self, authority: &Address, new_multiplier: f64, new_multiplier_effective_timestamp: i64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update multiplier
Sourcepub async fn update_transfer_hook_program_id<S: Signers>(
&self,
authority: &Address,
new_program_id: Option<Address>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn update_transfer_hook_program_id<S: Signers>( &self, authority: &Address, new_program_id: Option<Address>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update transfer hook program id
Sourcepub async fn update_metadata_address<S: Signers>(
&self,
authority: &Address,
new_metadata_address: Option<Address>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn update_metadata_address<S: Signers>( &self, authority: &Address, new_metadata_address: Option<Address>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update metadata pointer address
Sourcepub async fn update_group_address<S: Signers>(
&self,
authority: &Address,
new_group_address: Option<Address>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn update_group_address<S: Signers>( &self, authority: &Address, new_group_address: Option<Address>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update group pointer address
Sourcepub async fn update_group_member_address<S: Signers>(
&self,
authority: &Address,
new_member_address: Option<Address>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn update_group_member_address<S: Signers>( &self, authority: &Address, new_member_address: Option<Address>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update group member pointer address
Sourcepub async fn confidential_transfer_update_mint<S: Signers>(
&self,
authority: &Address,
auto_approve_new_account: bool,
auditor_elgamal_pubkey: Option<PodElGamalPubkey>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_update_mint<S: Signers>( &self, authority: &Address, auto_approve_new_account: bool, auditor_elgamal_pubkey: Option<PodElGamalPubkey>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update confidential transfer mint
Sourcepub async fn confidential_transfer_configure_token_account<S: Signers>(
&self,
account: &Address,
authority: &Address,
context_state_account: Option<&Address>,
maximum_pending_balance_credit_counter: Option<u64>,
elgamal_keypair: &ElGamalKeypair,
aes_key: &AeKey,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_configure_token_account<S: Signers>( &self, account: &Address, authority: &Address, context_state_account: Option<&Address>, maximum_pending_balance_credit_counter: Option<u64>, elgamal_keypair: &ElGamalKeypair, aes_key: &AeKey, signing_keypairs: &S, ) -> TokenResult<T::Output>
Configures confidential transfers for a token account. If the maximum
pending balance credit counter for the extension is not provided,
then it is set to be a default value of 2^16.
Sourcepub async fn confidential_transfer_configure_token_account_with_registry(
&self,
account: &Address,
elgamal_registry_account: &Address,
payer: Option<&Address>,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_configure_token_account_with_registry( &self, account: &Address, elgamal_registry_account: &Address, payer: Option<&Address>, ) -> TokenResult<T::Output>
Configures confidential transfers for a token account using an ElGamal registry account
Sourcepub async fn confidential_transfer_approve_account<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_approve_account<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Approves a token account for confidential transfers
Sourcepub async fn confidential_transfer_empty_account<S: Signers>(
&self,
account: &Address,
authority: &Address,
context_state_account: Option<&Address>,
account_info: Option<EmptyAccountAccountInfo>,
elgamal_keypair: &ElGamalKeypair,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_empty_account<S: Signers>( &self, account: &Address, authority: &Address, context_state_account: Option<&Address>, account_info: Option<EmptyAccountAccountInfo>, elgamal_keypair: &ElGamalKeypair, signing_keypairs: &S, ) -> TokenResult<T::Output>
Prepare a token account with the confidential transfer extension for closing
Sourcepub async fn confidential_transfer_deposit<S: Signers>(
&self,
account: &Address,
authority: &Address,
amount: u64,
decimals: u8,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_deposit<S: Signers>( &self, account: &Address, authority: &Address, amount: u64, decimals: u8, signing_keypairs: &S, ) -> TokenResult<T::Output>
Deposit SPL Tokens into the pending balance of a confidential token account
Sourcepub async fn confidential_transfer_withdraw<S: Signers>(
&self,
account: &Address,
authority: &Address,
equality_proof_account: Option<&Address>,
range_proof_account: Option<&Address>,
withdraw_amount: u64,
decimals: u8,
account_info: Option<WithdrawAccountInfo>,
elgamal_keypair: &ElGamalKeypair,
aes_key: &AeKey,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_withdraw<S: Signers>( &self, account: &Address, authority: &Address, equality_proof_account: Option<&Address>, range_proof_account: Option<&Address>, withdraw_amount: u64, decimals: u8, account_info: Option<WithdrawAccountInfo>, elgamal_keypair: &ElGamalKeypair, aes_key: &AeKey, signing_keypairs: &S, ) -> TokenResult<T::Output>
Withdraw SPL Tokens from the available balance of a confidential token account
Sourcepub async fn confidential_transfer_transfer<S: Signers>(
&self,
source_account: &Address,
destination_account: &Address,
source_authority: &Address,
equality_proof_account: Option<&Address>,
ciphertext_validity_proof_account_with_ciphertext: Option<&ProofAccountWithCiphertext>,
range_proof_account: Option<&Address>,
transfer_amount: u64,
account_info: Option<TransferAccountInfo>,
source_elgamal_keypair: &ElGamalKeypair,
source_aes_key: &AeKey,
destination_elgamal_pubkey: &ElGamalPubkey,
auditor_elgamal_pubkey: Option<&ElGamalPubkey>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_transfer<S: Signers>( &self, source_account: &Address, destination_account: &Address, source_authority: &Address, equality_proof_account: Option<&Address>, ciphertext_validity_proof_account_with_ciphertext: Option<&ProofAccountWithCiphertext>, range_proof_account: Option<&Address>, transfer_amount: u64, account_info: Option<TransferAccountInfo>, source_elgamal_keypair: &ElGamalKeypair, source_aes_key: &AeKey, destination_elgamal_pubkey: &ElGamalPubkey, auditor_elgamal_pubkey: Option<&ElGamalPubkey>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Transfer tokens confidentially
Sourcepub async fn confidential_transfer_create_record_account<S1: Signer, S2: Signer, ZK: Pod + ZkProofData<U>, U: Pod>(
&self,
record_account: &Address,
record_authority: &Address,
proof_data: &ZK,
record_account_signer: &S1,
record_authority_signer: &S2,
) -> TokenResult<Vec<T::Output>>
pub async fn confidential_transfer_create_record_account<S1: Signer, S2: Signer, ZK: Pod + ZkProofData<U>, U: Pod>( &self, record_account: &Address, record_authority: &Address, proof_data: &ZK, record_account_signer: &S1, record_authority_signer: &S2, ) -> TokenResult<Vec<T::Output>>
Create a record account containing zero-knowledge proof needed for a confidential transfer.
Sourcepub async fn confidential_transfer_close_record_account<S: Signers>(
&self,
record_account: &Address,
lamport_destination_account: &Address,
record_account_authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_close_record_account<S: Signers>( &self, record_account: &Address, lamport_destination_account: &Address, record_account_authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Close a record account.
Sourcepub async fn confidential_transfer_create_context_state_account<S: Signers, ZK: Pod + ZkProofData<U>, U: Pod>(
&self,
context_state_account: &Address,
context_state_authority: &Address,
proof_data: &ZK,
split_account_creation_and_proof_verification: bool,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_create_context_state_account<S: Signers, ZK: Pod + ZkProofData<U>, U: Pod>( &self, context_state_account: &Address, context_state_authority: &Address, proof_data: &ZK, split_account_creation_and_proof_verification: bool, signing_keypairs: &S, ) -> TokenResult<T::Output>
Create a context state account containing zero-knowledge proof needed for a confidential transfer instruction.
Sourcepub async fn confidential_transfer_create_context_state_account_from_record<S: Signers, ZK: Pod + ZkProofData<U>, U: Pod>(
&self,
context_state_account: &Address,
context_state_authority: &Address,
record_account: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_create_context_state_account_from_record<S: Signers, ZK: Pod + ZkProofData<U>, U: Pod>( &self, context_state_account: &Address, context_state_authority: &Address, record_account: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Create a context state account from another account containing zero-knowledge proof needed for a confidential transfer instruction.
Sourcepub async fn confidential_transfer_close_context_state_account<S: Signers>(
&self,
context_state_account: &Address,
lamport_destination_account: &Address,
context_state_authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_close_context_state_account<S: Signers>( &self, context_state_account: &Address, lamport_destination_account: &Address, context_state_authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Close a ZK Token proof program context state
Sourcepub async fn confidential_transfer_transfer_with_fee<S: Signers>(
&self,
source_account: &Address,
destination_account: &Address,
source_authority: &Address,
equality_proof_account: Option<&Address>,
transfer_amount_ciphertext_validity_proof_account_with_ciphertext: Option<&ProofAccountWithCiphertext>,
percentage_with_cap_proof_account: Option<&Address>,
fee_ciphertext_validity_proof_account: Option<&Address>,
range_proof_account: Option<&Address>,
transfer_amount: u64,
account_info: Option<TransferAccountInfo>,
source_elgamal_keypair: &ElGamalKeypair,
source_aes_key: &AeKey,
destination_elgamal_pubkey: &ElGamalPubkey,
auditor_elgamal_pubkey: Option<&ElGamalPubkey>,
withdraw_withheld_authority_elgamal_pubkey: &ElGamalPubkey,
fee_rate_basis_points: u16,
maximum_fee: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_transfer_with_fee<S: Signers>( &self, source_account: &Address, destination_account: &Address, source_authority: &Address, equality_proof_account: Option<&Address>, transfer_amount_ciphertext_validity_proof_account_with_ciphertext: Option<&ProofAccountWithCiphertext>, percentage_with_cap_proof_account: Option<&Address>, fee_ciphertext_validity_proof_account: Option<&Address>, range_proof_account: Option<&Address>, transfer_amount: u64, account_info: Option<TransferAccountInfo>, source_elgamal_keypair: &ElGamalKeypair, source_aes_key: &AeKey, destination_elgamal_pubkey: &ElGamalPubkey, auditor_elgamal_pubkey: Option<&ElGamalPubkey>, withdraw_withheld_authority_elgamal_pubkey: &ElGamalPubkey, fee_rate_basis_points: u16, maximum_fee: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Transfer tokens confidentially with fee
Sourcepub async fn confidential_transfer_apply_pending_balance<S: Signers>(
&self,
account: &Address,
authority: &Address,
account_info: Option<ApplyPendingBalanceAccountInfo>,
elgamal_secret_key: &ElGamalSecretKey,
aes_key: &AeKey,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_apply_pending_balance<S: Signers>( &self, account: &Address, authority: &Address, account_info: Option<ApplyPendingBalanceAccountInfo>, elgamal_secret_key: &ElGamalSecretKey, aes_key: &AeKey, signing_keypairs: &S, ) -> TokenResult<T::Output>
Applies the confidential transfer pending balance to the available balance
Sourcepub async fn confidential_transfer_enable_confidential_credits<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_enable_confidential_credits<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Enable confidential transfer Deposit and Transfer instructions for a
token account
Sourcepub async fn confidential_transfer_disable_confidential_credits<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_disable_confidential_credits<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Disable confidential transfer Deposit and Transfer instructions for
a token account
Sourcepub async fn confidential_transfer_enable_non_confidential_credits<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_enable_non_confidential_credits<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Enable a confidential extension token account to receive non-confidential payments
Sourcepub async fn confidential_transfer_disable_non_confidential_credits<S: Signers>(
&self,
account: &Address,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_disable_non_confidential_credits<S: Signers>( &self, account: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Disable non-confidential payments for a confidential extension token account
Sourcepub async fn confidential_transfer_withdraw_withheld_tokens_from_mint<S: Signers>(
&self,
destination_account: &Address,
withdraw_withheld_authority: &Address,
context_state_account: Option<&Address>,
withheld_tokens_info: Option<WithheldTokensInfo>,
withdraw_withheld_authority_elgamal_keypair: &ElGamalKeypair,
destination_elgamal_pubkey: &ElGamalPubkey,
new_decryptable_available_balance: &DecryptableBalance,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_withdraw_withheld_tokens_from_mint<S: Signers>( &self, destination_account: &Address, withdraw_withheld_authority: &Address, context_state_account: Option<&Address>, withheld_tokens_info: Option<WithheldTokensInfo>, withdraw_withheld_authority_elgamal_keypair: &ElGamalKeypair, destination_elgamal_pubkey: &ElGamalPubkey, new_decryptable_available_balance: &DecryptableBalance, signing_keypairs: &S, ) -> TokenResult<T::Output>
Withdraw withheld confidential tokens from mint
Sourcepub async fn confidential_transfer_withdraw_withheld_tokens_from_accounts<S: Signers>(
&self,
destination_account: &Address,
withdraw_withheld_authority: &Address,
context_state_account: Option<&Address>,
withheld_tokens_info: Option<WithheldTokensInfo>,
withdraw_withheld_authority_elgamal_keypair: &ElGamalKeypair,
destination_elgamal_pubkey: &ElGamalPubkey,
new_decryptable_available_balance: &DecryptableBalance,
sources: &[&Address],
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_withdraw_withheld_tokens_from_accounts<S: Signers>( &self, destination_account: &Address, withdraw_withheld_authority: &Address, context_state_account: Option<&Address>, withheld_tokens_info: Option<WithheldTokensInfo>, withdraw_withheld_authority_elgamal_keypair: &ElGamalKeypair, destination_elgamal_pubkey: &ElGamalPubkey, new_decryptable_available_balance: &DecryptableBalance, sources: &[&Address], signing_keypairs: &S, ) -> TokenResult<T::Output>
Withdraw withheld confidential tokens from accounts
Sourcepub async fn confidential_transfer_harvest_withheld_tokens_to_mint(
&self,
sources: &[&Address],
) -> TokenResult<T::Output>
pub async fn confidential_transfer_harvest_withheld_tokens_to_mint( &self, sources: &[&Address], ) -> TokenResult<T::Output>
Harvest withheld confidential tokens to mint
Sourcepub async fn confidential_transfer_enable_harvest_to_mint<S: Signers>(
&self,
withdraw_withheld_authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_enable_harvest_to_mint<S: Signers>( &self, withdraw_withheld_authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Enable harvest of confidential fees to mint
Sourcepub async fn confidential_transfer_disable_harvest_to_mint<S: Signers>(
&self,
withdraw_withheld_authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_disable_harvest_to_mint<S: Signers>( &self, withdraw_withheld_authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Disable harvest of confidential fees to mint
Sourcepub async fn confidential_transfer_rotate_supply_elgamal_pubkey<S: Signers>(
&self,
authority: &Address,
current_supply_elgamal_keypair: &ElGamalKeypair,
new_supply_elgamal_pubkey: &ElGamalPubkey,
aes_key: &AeKey,
context_state_account: Option<&Address>,
account_info: Option<SupplyAccountInfo>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_rotate_supply_elgamal_pubkey<S: Signers>( &self, authority: &Address, current_supply_elgamal_keypair: &ElGamalKeypair, new_supply_elgamal_pubkey: &ElGamalPubkey, aes_key: &AeKey, context_state_account: Option<&Address>, account_info: Option<SupplyAccountInfo>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Rotate supply ElGamal public key in a confidential mint
Sourcepub async fn confidential_transfer_update_decrypt_supply<S: Signers>(
&self,
authority: &Address,
new_decryptable_supply: &DecryptableBalance,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_update_decrypt_supply<S: Signers>( &self, authority: &Address, new_decryptable_supply: &DecryptableBalance, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update decryptable supply in a confidential mint
Sourcepub async fn confidential_transfer_mint<S: Signers>(
&self,
authority: &Address,
destination_account: &Address,
equality_proof_account: Option<&Address>,
ciphertext_validity_proof_account_with_ciphertext: Option<&ProofAccountWithCiphertext>,
range_proof_account: Option<&Address>,
mint_amount: u64,
supply_elgamal_keypair: &ElGamalKeypair,
destination_elgamal_pubkey: &ElGamalPubkey,
auditor_elgamal_pubkey: Option<&ElGamalPubkey>,
aes_key: &AeKey,
account_info: Option<SupplyAccountInfo>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_mint<S: Signers>( &self, authority: &Address, destination_account: &Address, equality_proof_account: Option<&Address>, ciphertext_validity_proof_account_with_ciphertext: Option<&ProofAccountWithCiphertext>, range_proof_account: Option<&Address>, mint_amount: u64, supply_elgamal_keypair: &ElGamalKeypair, destination_elgamal_pubkey: &ElGamalPubkey, auditor_elgamal_pubkey: Option<&ElGamalPubkey>, aes_key: &AeKey, account_info: Option<SupplyAccountInfo>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Confidentially mint tokens
Sourcepub async fn confidential_transfer_permissioned_burn<S: Signers>(
&self,
authority: &Address,
source_account: &Address,
permissioned_burn_authority: &Address,
equality_proof_account: Option<&Address>,
ciphertext_validity_proof_account_with_ciphertext: Option<&ProofAccountWithCiphertext>,
range_proof_account: Option<&Address>,
burn_amount: u64,
source_elgamal_keypair: &ElGamalKeypair,
supply_elgamal_pubkey: &ElGamalPubkey,
auditor_elgamal_pubkey: Option<&ElGamalPubkey>,
aes_key: &AeKey,
account_info: Option<BurnAccountInfo>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_permissioned_burn<S: Signers>( &self, authority: &Address, source_account: &Address, permissioned_burn_authority: &Address, equality_proof_account: Option<&Address>, ciphertext_validity_proof_account_with_ciphertext: Option<&ProofAccountWithCiphertext>, range_proof_account: Option<&Address>, burn_amount: u64, source_elgamal_keypair: &ElGamalKeypair, supply_elgamal_pubkey: &ElGamalPubkey, auditor_elgamal_pubkey: Option<&ElGamalPubkey>, aes_key: &AeKey, account_info: Option<BurnAccountInfo>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Confidentially burn tokens with permissioned burn authority
Sourcepub async fn confidential_transfer_burn<S: Signers>(
&self,
authority: &Address,
source_account: &Address,
equality_proof_account: Option<&Address>,
ciphertext_validity_proof_account_with_ciphertext: Option<&ProofAccountWithCiphertext>,
range_proof_account: Option<&Address>,
burn_amount: u64,
source_elgamal_keypair: &ElGamalKeypair,
supply_elgamal_pubkey: &ElGamalPubkey,
auditor_elgamal_pubkey: Option<&ElGamalPubkey>,
aes_key: &AeKey,
account_info: Option<BurnAccountInfo>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_burn<S: Signers>( &self, authority: &Address, source_account: &Address, equality_proof_account: Option<&Address>, ciphertext_validity_proof_account_with_ciphertext: Option<&ProofAccountWithCiphertext>, range_proof_account: Option<&Address>, burn_amount: u64, source_elgamal_keypair: &ElGamalKeypair, supply_elgamal_pubkey: &ElGamalPubkey, auditor_elgamal_pubkey: Option<&ElGamalPubkey>, aes_key: &AeKey, account_info: Option<BurnAccountInfo>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Confidentially burn tokens
Sourcepub async fn confidential_transfer_apply_pending_burn<S: Signers>(
&self,
authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn confidential_transfer_apply_pending_burn<S: Signers>( &self, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Apply pending burn amount to the confidential supply amount
pub async fn withdraw_excess_lamports<S: Signers>( &self, source: &Address, destination: &Address, authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Sourcepub async fn token_metadata_initialize<S: Signers>(
&self,
update_authority: &Address,
mint_authority: &Address,
name: String,
symbol: String,
uri: String,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn token_metadata_initialize<S: Signers>( &self, update_authority: &Address, mint_authority: &Address, name: String, symbol: String, uri: String, signing_keypairs: &S, ) -> TokenResult<T::Output>
Initialize token-metadata on a mint
Sourcepub async fn token_metadata_initialize_with_rent_transfer<S: Signers>(
&self,
payer: &Address,
update_authority: &Address,
mint_authority: &Address,
name: String,
symbol: String,
uri: String,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn token_metadata_initialize_with_rent_transfer<S: Signers>( &self, payer: &Address, update_authority: &Address, mint_authority: &Address, name: String, symbol: String, uri: String, signing_keypairs: &S, ) -> TokenResult<T::Output>
Initialize token-metadata on a mint
Sourcepub async fn token_metadata_update_field<S: Signers>(
&self,
update_authority: &Address,
field: Field,
value: String,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn token_metadata_update_field<S: Signers>( &self, update_authority: &Address, field: Field, value: String, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update a token-metadata field on a mint
Sourcepub async fn token_metadata_update_field_with_rent_transfer<S: Signers>(
&self,
payer: &Address,
update_authority: &Address,
field: Field,
value: String,
transfer_lamports: Option<u64>,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn token_metadata_update_field_with_rent_transfer<S: Signers>( &self, payer: &Address, update_authority: &Address, field: Field, value: String, transfer_lamports: Option<u64>, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update a token-metadata field on a mint. Includes a transfer for any additional rent-exempt SOL required.
Update the token-metadata authority in a mint
Sourcepub async fn token_metadata_remove_key<S: Signers>(
&self,
update_authority: &Address,
key: String,
idempotent: bool,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn token_metadata_remove_key<S: Signers>( &self, update_authority: &Address, key: String, idempotent: bool, signing_keypairs: &S, ) -> TokenResult<T::Output>
Remove a token-metadata field on a mint
Sourcepub async fn token_group_initialize<S: Signers>(
&self,
mint_authority: &Address,
update_authority: &Address,
max_size: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn token_group_initialize<S: Signers>( &self, mint_authority: &Address, update_authority: &Address, max_size: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Initialize token-group on a mint
Sourcepub async fn token_group_initialize_with_rent_transfer<S: Signers>(
&self,
payer: &Address,
mint_authority: &Address,
update_authority: &Address,
max_size: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn token_group_initialize_with_rent_transfer<S: Signers>( &self, payer: &Address, mint_authority: &Address, update_authority: &Address, max_size: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Initialize token-group on a mint
Sourcepub async fn token_group_update_max_size<S: Signers>(
&self,
update_authority: &Address,
new_max_size: u64,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn token_group_update_max_size<S: Signers>( &self, update_authority: &Address, new_max_size: u64, signing_keypairs: &S, ) -> TokenResult<T::Output>
Update a token-group max size on a mint
Update the token-group authority in a mint
Sourcepub async fn token_group_initialize_member<S: Signers>(
&self,
mint_authority: &Address,
group_mint: &Address,
group_update_authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn token_group_initialize_member<S: Signers>( &self, mint_authority: &Address, group_mint: &Address, group_update_authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Initialize a token-group member on a mint
Sourcepub async fn token_group_initialize_member_with_rent_transfer<S: Signers>(
&self,
payer: &Address,
mint_authority: &Address,
group_mint: &Address,
group_update_authority: &Address,
signing_keypairs: &S,
) -> TokenResult<T::Output>
pub async fn token_group_initialize_member_with_rent_transfer<S: Signers>( &self, payer: &Address, mint_authority: &Address, group_mint: &Address, group_update_authority: &Address, signing_keypairs: &S, ) -> TokenResult<T::Output>
Initialize a token-group member on a mint
Sourcepub async fn confidential_transfer_get_pending_balance(
&self,
account: &Address,
elgamal_secret_key: &ElGamalSecretKey,
) -> TokenResult<u64>
pub async fn confidential_transfer_get_pending_balance( &self, account: &Address, elgamal_secret_key: &ElGamalSecretKey, ) -> TokenResult<u64>
Get the pending balance for a confidential transfer account.
This decrypts and combines the low 16 bits and high 48 bits of the pending balance into a single u64 value.
Sourcepub async fn confidential_transfer_get_available_balance(
&self,
account: &Address,
aes_key: &AeKey,
) -> TokenResult<u64>
pub async fn confidential_transfer_get_available_balance( &self, account: &Address, aes_key: &AeKey, ) -> TokenResult<u64>
Get the available balance for a confidential transfer account.
This decrypts the decryptable available balance using the provided AES key.
Sourcepub async fn confidential_transfer_get_total_balance(
&self,
account: &Address,
elgamal_secret_key: &ElGamalSecretKey,
aes_key: &AeKey,
) -> TokenResult<u64>
pub async fn confidential_transfer_get_total_balance( &self, account: &Address, elgamal_secret_key: &ElGamalSecretKey, aes_key: &AeKey, ) -> TokenResult<u64>
Get the total balance (pending and available) for a confidential transfer account.
This combines both pending and available balances with overflow protection.
Sourcepub async fn confidential_transfer_has_pending_balance(
&self,
account: &Address,
) -> TokenResult<bool>
pub async fn confidential_transfer_has_pending_balance( &self, account: &Address, ) -> TokenResult<bool>
Check if a confidential transfer account has any pending balance.
This checks whether the pending_balance_credit_counter is greater than zero.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Token<T>
impl<T> !Send for Token<T>
impl<T> !Sync for Token<T>
impl<T> !UnwindSafe for Token<T>
impl<T> Freeze for Token<T>
impl<T> Unpin for Token<T>
impl<T> UnsafeUnpin for Token<T>
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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>
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>
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 moreimpl<T> MaybeSendSync for T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.