Struct switchboard_solana::prelude::Transaction
pub struct Transaction {
pub signatures: Vec<Signature>,
pub message: Message,
}
Expand description
An atomically-committed sequence of instructions.
While Instruction
s are the basic unit of computation in Solana,
they are submitted by clients in Transaction
s containing one or
more instructions, and signed by one or more Signer
s.
See the module documentation for more details about transactions.
Some constructors accept an optional payer
, the account responsible for
paying the cost of executing a transaction. In most cases, callers should
specify the payer explicitly in these constructors. In some cases though,
the caller is not required to specify the payer, but is still allowed to:
in the Message
structure, the first account is always the fee-payer, so
if the caller has knowledge that the first account of the constructed
transaction’s Message
is both a signer and the expected fee-payer, then
redundantly specifying the fee-payer is not strictly required.
Fields§
§signatures: Vec<Signature>
A set of signatures of a serialized Message
, signed by the first
keys of the Message
’s account_keys
, where the number of signatures
is equal to num_required_signatures
of the Message
’s
MessageHeader
.
message: Message
The message to sign.
Implementations§
§impl Transaction
impl Transaction
pub fn new_unsigned(message: Message) -> Transaction
pub fn new_unsigned(message: Message) -> Transaction
Create an unsigned transaction from a Message
.
§Examples
This example uses the solana_rpc_client
and anyhow
crates.
use anyhow::Result;
use borsh::{BorshSerialize, BorshDeserialize};
use solana_rpc_client::rpc_client::RpcClient;
use solana_sdk::{
instruction::Instruction,
message::Message,
pubkey::Pubkey,
signature::{Keypair, Signer},
transaction::Transaction,
};
// A custom program instruction. This would typically be defined in
// another crate so it can be shared between the on-chain program and
// the client.
#[derive(BorshSerialize, BorshDeserialize)]
enum BankInstruction {
Initialize,
Deposit { lamports: u64 },
Withdraw { lamports: u64 },
}
fn send_initialize_tx(
client: &RpcClient,
program_id: Pubkey,
payer: &Keypair
) -> Result<()> {
let bank_instruction = BankInstruction::Initialize;
let instruction = Instruction::new_with_borsh(
program_id,
&bank_instruction,
vec![],
);
let message = Message::new(
&[instruction],
Some(&payer.pubkey()),
);
let mut tx = Transaction::new_unsigned(message);
let blockhash = client.get_latest_blockhash()?;
tx.sign(&[payer], blockhash);
client.send_and_confirm_transaction(&tx)?;
Ok(())
}
pub fn new<T>(
from_keypairs: &T,
message: Message,
recent_blockhash: Hash
) -> Transactionwhere
T: Signers + ?Sized,
pub fn new<T>(
from_keypairs: &T,
message: Message,
recent_blockhash: Hash
) -> Transactionwhere
T: Signers + ?Sized,
Create a fully-signed transaction from a Message
.
§Panics
Panics when signing fails. See Transaction::try_sign
and
Transaction::try_partial_sign
for a full description of failure
scenarios.
§Examples
This example uses the solana_rpc_client
and anyhow
crates.
use anyhow::Result;
use borsh::{BorshSerialize, BorshDeserialize};
use solana_rpc_client::rpc_client::RpcClient;
use solana_sdk::{
instruction::Instruction,
message::Message,
pubkey::Pubkey,
signature::{Keypair, Signer},
transaction::Transaction,
};
// A custom program instruction. This would typically be defined in
// another crate so it can be shared between the on-chain program and
// the client.
#[derive(BorshSerialize, BorshDeserialize)]
enum BankInstruction {
Initialize,
Deposit { lamports: u64 },
Withdraw { lamports: u64 },
}
fn send_initialize_tx(
client: &RpcClient,
program_id: Pubkey,
payer: &Keypair
) -> Result<()> {
let bank_instruction = BankInstruction::Initialize;
let instruction = Instruction::new_with_borsh(
program_id,
&bank_instruction,
vec![],
);
let message = Message::new(
&[instruction],
Some(&payer.pubkey()),
);
let blockhash = client.get_latest_blockhash()?;
let mut tx = Transaction::new(&[payer], message, blockhash);
client.send_and_confirm_transaction(&tx)?;
Ok(())
}
pub fn new_with_payer(
instructions: &[Instruction],
payer: Option<&Pubkey>
) -> Transaction
pub fn new_with_payer( instructions: &[Instruction], payer: Option<&Pubkey> ) -> Transaction
Create an unsigned transaction from a list of Instruction
s.
payer
is the account responsible for paying the cost of executing the
transaction. It is typically provided, but is optional in some cases.
See the Transaction
docs for more.
§Examples
This example uses the solana_rpc_client
and anyhow
crates.
use anyhow::Result;
use borsh::{BorshSerialize, BorshDeserialize};
use solana_rpc_client::rpc_client::RpcClient;
use solana_sdk::{
instruction::Instruction,
message::Message,
pubkey::Pubkey,
signature::{Keypair, Signer},
transaction::Transaction,
};
// A custom program instruction. This would typically be defined in
// another crate so it can be shared between the on-chain program and
// the client.
#[derive(BorshSerialize, BorshDeserialize)]
enum BankInstruction {
Initialize,
Deposit { lamports: u64 },
Withdraw { lamports: u64 },
}
fn send_initialize_tx(
client: &RpcClient,
program_id: Pubkey,
payer: &Keypair
) -> Result<()> {
let bank_instruction = BankInstruction::Initialize;
let instruction = Instruction::new_with_borsh(
program_id,
&bank_instruction,
vec![],
);
let mut tx = Transaction::new_with_payer(&[instruction], Some(&payer.pubkey()));
let blockhash = client.get_latest_blockhash()?;
tx.sign(&[payer], blockhash);
client.send_and_confirm_transaction(&tx)?;
Ok(())
}
pub fn new_signed_with_payer<T>(
instructions: &[Instruction],
payer: Option<&Pubkey>,
signing_keypairs: &T,
recent_blockhash: Hash
) -> Transactionwhere
T: Signers + ?Sized,
pub fn new_signed_with_payer<T>(
instructions: &[Instruction],
payer: Option<&Pubkey>,
signing_keypairs: &T,
recent_blockhash: Hash
) -> Transactionwhere
T: Signers + ?Sized,
Create a fully-signed transaction from a list of Instruction
s.
payer
is the account responsible for paying the cost of executing the
transaction. It is typically provided, but is optional in some cases.
See the Transaction
docs for more.
§Panics
Panics when signing fails. See Transaction::try_sign
and
Transaction::try_partial_sign
for a full description of failure
scenarios.
§Examples
This example uses the solana_rpc_client
and anyhow
crates.
use anyhow::Result;
use borsh::{BorshSerialize, BorshDeserialize};
use solana_rpc_client::rpc_client::RpcClient;
use solana_sdk::{
instruction::Instruction,
message::Message,
pubkey::Pubkey,
signature::{Keypair, Signer},
transaction::Transaction,
};
// A custom program instruction. This would typically be defined in
// another crate so it can be shared between the on-chain program and
// the client.
#[derive(BorshSerialize, BorshDeserialize)]
enum BankInstruction {
Initialize,
Deposit { lamports: u64 },
Withdraw { lamports: u64 },
}
fn send_initialize_tx(
client: &RpcClient,
program_id: Pubkey,
payer: &Keypair
) -> Result<()> {
let bank_instruction = BankInstruction::Initialize;
let instruction = Instruction::new_with_borsh(
program_id,
&bank_instruction,
vec![],
);
let blockhash = client.get_latest_blockhash()?;
let mut tx = Transaction::new_signed_with_payer(
&[instruction],
Some(&payer.pubkey()),
&[payer],
blockhash,
);
client.send_and_confirm_transaction(&tx)?;
Ok(())
}
pub fn new_with_compiled_instructions<T>(
from_keypairs: &T,
keys: &[Pubkey],
recent_blockhash: Hash,
program_ids: Vec<Pubkey>,
instructions: Vec<CompiledInstruction>
) -> Transactionwhere
T: Signers + ?Sized,
pub fn new_with_compiled_instructions<T>(
from_keypairs: &T,
keys: &[Pubkey],
recent_blockhash: Hash,
program_ids: Vec<Pubkey>,
instructions: Vec<CompiledInstruction>
) -> Transactionwhere
T: Signers + ?Sized,
Create a fully-signed transaction from pre-compiled instructions.
§Arguments
from_keypairs
- The keys used to sign the transaction.keys
- The keys for the transaction. These are the program state instances or lamport recipient keys.recent_blockhash
- The PoH hash.program_ids
- The keys that identify programs used in theinstruction
vector.instructions
- Instructions that will be executed atomically.
§Panics
Panics when signing fails. See Transaction::try_sign
and for a full
description of failure conditions.
pub fn data(&self, instruction_index: usize) -> &[u8] ⓘ
pub fn data(&self, instruction_index: usize) -> &[u8] ⓘ
Get the data for an instruction at the given index.
The instruction_index
corresponds to the instructions
vector of
the Transaction
’s Message
value.
§Panics
Panics if instruction_index
is greater than or equal to the number of
instructions in the transaction.
pub fn key(
&self,
instruction_index: usize,
accounts_index: usize
) -> Option<&Pubkey>
pub fn key( &self, instruction_index: usize, accounts_index: usize ) -> Option<&Pubkey>
Get the Pubkey
of an account required by one of the instructions in
the transaction.
The instruction_index
corresponds to the instructions
vector of
the Transaction
’s Message
value; and the account_index
to the
accounts
vector of the message’s CompiledInstruction
s.
Returns None
if instruction_index
is greater than or equal to the
number of instructions in the transaction; or if accounts_index
is
greater than or equal to the number of accounts in the instruction.
pub fn signer_key(
&self,
instruction_index: usize,
accounts_index: usize
) -> Option<&Pubkey>
pub fn signer_key( &self, instruction_index: usize, accounts_index: usize ) -> Option<&Pubkey>
Get the Pubkey
of a signing account required by one of the
instructions in the transaction.
The transaction does not need to be signed for this function to return a signing account’s pubkey.
Returns None
if the indexed account is not required to sign the
transaction. Returns None
if the signatures
field does not contain
enough elements to hold a signature for the indexed account (this should
only be possible if Transaction
has been manually constructed).
Returns None
if instruction_index
is greater than or equal to the
number of instructions in the transaction; or if accounts_index
is
greater than or equal to the number of accounts in the instruction.
pub fn message_data(&self) -> Vec<u8> ⓘ
pub fn message_data(&self) -> Vec<u8> ⓘ
Return the serialized message data to sign.
pub fn sign<T>(&mut self, keypairs: &T, recent_blockhash: Hash)where
T: Signers + ?Sized,
pub fn sign<T>(&mut self, keypairs: &T, recent_blockhash: Hash)where
T: Signers + ?Sized,
Sign the transaction.
This method fully signs a transaction with all required signers, which
must be present in the keypairs
slice. To sign with only some of the
required signers, use Transaction::partial_sign
.
If recent_blockhash
is different than recorded in the transaction message’s
recent_blockhash
field, then the message’s recent_blockhash
will be updated
to the provided recent_blockhash
, and any prior signatures will be cleared.
§Panics
Panics when signing fails. Use Transaction::try_sign
to handle the
error. See the documentation for Transaction::try_sign
for a full description of
failure conditions.
§Examples
This example uses the solana_rpc_client
and anyhow
crates.
use anyhow::Result;
use borsh::{BorshSerialize, BorshDeserialize};
use solana_rpc_client::rpc_client::RpcClient;
use solana_sdk::{
instruction::Instruction,
message::Message,
pubkey::Pubkey,
signature::{Keypair, Signer},
transaction::Transaction,
};
// A custom program instruction. This would typically be defined in
// another crate so it can be shared between the on-chain program and
// the client.
#[derive(BorshSerialize, BorshDeserialize)]
enum BankInstruction {
Initialize,
Deposit { lamports: u64 },
Withdraw { lamports: u64 },
}
fn send_initialize_tx(
client: &RpcClient,
program_id: Pubkey,
payer: &Keypair
) -> Result<()> {
let bank_instruction = BankInstruction::Initialize;
let instruction = Instruction::new_with_borsh(
program_id,
&bank_instruction,
vec![],
);
let mut tx = Transaction::new_with_payer(&[instruction], Some(&payer.pubkey()));
let blockhash = client.get_latest_blockhash()?;
tx.sign(&[payer], blockhash);
client.send_and_confirm_transaction(&tx)?;
Ok(())
}
pub fn partial_sign<T>(&mut self, keypairs: &T, recent_blockhash: Hash)where
T: Signers + ?Sized,
pub fn partial_sign<T>(&mut self, keypairs: &T, recent_blockhash: Hash)where
T: Signers + ?Sized,
Sign the transaction with a subset of required keys.
Unlike Transaction::sign
, this method does not require all keypairs
to be provided, allowing a transaction to be signed in multiple steps.
It is permitted to sign a transaction with the same keypair multiple times.
If recent_blockhash
is different than recorded in the transaction message’s
recent_blockhash
field, then the message’s recent_blockhash
will be updated
to the provided recent_blockhash
, and any prior signatures will be cleared.
§Panics
Panics when signing fails. Use Transaction::try_partial_sign
to
handle the error. See the documentation for
Transaction::try_partial_sign
for a full description of failure
conditions.
pub fn partial_sign_unchecked<T>(
&mut self,
keypairs: &T,
positions: Vec<usize>,
recent_blockhash: Hash
)where
T: Signers + ?Sized,
pub fn partial_sign_unchecked<T>(
&mut self,
keypairs: &T,
positions: Vec<usize>,
recent_blockhash: Hash
)where
T: Signers + ?Sized,
Sign the transaction with a subset of required keys.
This places each of the signatures created from keypairs
in the
corresponding position, as specified in the positions
vector, in the
transactions signatures
field. It does not verify that the signature
positions are correct.
§Panics
Panics if signing fails. Use Transaction::try_partial_sign_unchecked
to handle the error.
pub fn try_sign<T>(
&mut self,
keypairs: &T,
recent_blockhash: Hash
) -> Result<(), SignerError>where
T: Signers + ?Sized,
pub fn try_sign<T>(
&mut self,
keypairs: &T,
recent_blockhash: Hash
) -> Result<(), SignerError>where
T: Signers + ?Sized,
Sign the transaction, returning any errors.
This method fully signs a transaction with all required signers, which
must be present in the keypairs
slice. To sign with only some of the
required signers, use Transaction::try_partial_sign
.
If recent_blockhash
is different than recorded in the transaction message’s
recent_blockhash
field, then the message’s recent_blockhash
will be updated
to the provided recent_blockhash
, and any prior signatures will be cleared.
§Errors
Signing will fail if some required signers are not provided in
keypairs
; or, if the transaction has previously been partially signed,
some of the remaining required signers are not provided in keypairs
.
In other words, the transaction must be fully signed as a result of
calling this function. The error is [SignerError::NotEnoughSigners
].
Signing will fail for any of the reasons described in the documentation
for Transaction::try_partial_sign
.
§Examples
This example uses the solana_rpc_client
and anyhow
crates.
use anyhow::Result;
use borsh::{BorshSerialize, BorshDeserialize};
use solana_rpc_client::rpc_client::RpcClient;
use solana_sdk::{
instruction::Instruction,
message::Message,
pubkey::Pubkey,
signature::{Keypair, Signer},
transaction::Transaction,
};
// A custom program instruction. This would typically be defined in
// another crate so it can be shared between the on-chain program and
// the client.
#[derive(BorshSerialize, BorshDeserialize)]
enum BankInstruction {
Initialize,
Deposit { lamports: u64 },
Withdraw { lamports: u64 },
}
fn send_initialize_tx(
client: &RpcClient,
program_id: Pubkey,
payer: &Keypair
) -> Result<()> {
let bank_instruction = BankInstruction::Initialize;
let instruction = Instruction::new_with_borsh(
program_id,
&bank_instruction,
vec![],
);
let mut tx = Transaction::new_with_payer(&[instruction], Some(&payer.pubkey()));
let blockhash = client.get_latest_blockhash()?;
tx.try_sign(&[payer], blockhash)?;
client.send_and_confirm_transaction(&tx)?;
Ok(())
}
pub fn try_partial_sign<T>(
&mut self,
keypairs: &T,
recent_blockhash: Hash
) -> Result<(), SignerError>where
T: Signers + ?Sized,
pub fn try_partial_sign<T>(
&mut self,
keypairs: &T,
recent_blockhash: Hash
) -> Result<(), SignerError>where
T: Signers + ?Sized,
Sign the transaction with a subset of required keys, returning any errors.
Unlike Transaction::try_sign
, this method does not require all
keypairs to be provided, allowing a transaction to be signed in multiple
steps.
It is permitted to sign a transaction with the same keypair multiple times.
If recent_blockhash
is different than recorded in the transaction message’s
recent_blockhash
field, then the message’s recent_blockhash
will be updated
to the provided recent_blockhash
, and any prior signatures will be cleared.
§Errors
Signing will fail if
- The transaction’s
Message
is malformed such that the number of required signatures recorded in its header (num_required_signatures
) is greater than the length of its account keys (account_keys
). The error is [SignerError::TransactionError
] where the interior [TransactionError
] is [TransactionError::InvalidAccountIndex
]. - Any of the provided signers in
keypairs
is not a required signer of the message. The error is [SignerError::KeypairPubkeyMismatch
]. - Any of the signers is a
Presigner
, and its provided signature is incorrect. The error is [SignerError::PresignerError
] where the interiorPresignerError
isPresignerError::VerificationFailure
. - The signer is a
RemoteKeypair
and- It does not understand the input provided ([
SignerError::InvalidInput
]). - The device cannot be found ([
SignerError::NoDeviceFound
]). - The user cancels the signing ([
SignerError::UserCancel
]). - An error was encountered connecting ([
SignerError::Connection
]). - Some device-specific protocol error occurs ([
SignerError::Protocol
]). - Some other error occurs ([
SignerError::Custom
]).
- It does not understand the input provided ([
See the documentation for the solana-remote-wallet
crate for details
on the operation of RemoteKeypair
signers.
pub fn try_partial_sign_unchecked<T>(
&mut self,
keypairs: &T,
positions: Vec<usize>,
recent_blockhash: Hash
) -> Result<(), SignerError>where
T: Signers + ?Sized,
pub fn try_partial_sign_unchecked<T>(
&mut self,
keypairs: &T,
positions: Vec<usize>,
recent_blockhash: Hash
) -> Result<(), SignerError>where
T: Signers + ?Sized,
Sign the transaction with a subset of required keys, returning any errors.
This places each of the signatures created from keypairs
in the
corresponding position, as specified in the positions
vector, in the
transactions signatures
field. It does not verify that the signature
positions are correct.
§Errors
Returns an error if signing fails.
pub fn get_invalid_signature() -> Signature
pub fn get_invalid_signature() -> Signature
Returns a signature that is not valid for signing this transaction.
pub fn verify(&self) -> Result<(), TransactionError>
pub fn verify(&self) -> Result<(), TransactionError>
Verifies that all signers have signed the message.
§Errors
Returns [TransactionError::SignatureFailure
] on error.
pub fn verify_and_hash_message(&self) -> Result<Hash, TransactionError>
pub fn verify_and_hash_message(&self) -> Result<Hash, TransactionError>
Verify the transaction and hash its message.
§Errors
Returns [TransactionError::SignatureFailure
] on error.
pub fn verify_with_results(&self) -> Vec<bool>
pub fn verify_with_results(&self) -> Vec<bool>
Verifies that all signers have signed the message.
Returns a vector with the length of required signatures, where each
element is either true
if that signer has signed, or false
if not.
pub fn verify_precompiles(
&self,
feature_set: &FeatureSet
) -> Result<(), TransactionError>
pub fn verify_precompiles( &self, feature_set: &FeatureSet ) -> Result<(), TransactionError>
Verify the precompiled programs in this transaction.
pub fn get_signing_keypair_positions(
&self,
pubkeys: &[Pubkey]
) -> Result<Vec<Option<usize>>, TransactionError>
pub fn get_signing_keypair_positions( &self, pubkeys: &[Pubkey] ) -> Result<Vec<Option<usize>>, TransactionError>
Get the positions of the pubkeys in account_keys
associated with signing keypairs.
pub fn replace_signatures(
&mut self,
signers: &[(Pubkey, Signature)]
) -> Result<(), TransactionError>
pub fn replace_signatures( &mut self, signers: &[(Pubkey, Signature)] ) -> Result<(), TransactionError>
Replace all the signatures and pubkeys.
pub fn is_signed(&self) -> bool
Trait Implementations§
§impl Clone for Transaction
impl Clone for Transaction
§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for Transaction
impl Debug for Transaction
§impl Default for Transaction
impl Default for Transaction
§fn default() -> Transaction
fn default() -> Transaction
§impl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Transaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Transaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Encodable for Transaction
impl Encodable for Transaction
type Encoded = EncodedTransaction
fn encode( &self, encoding: UiTransactionEncoding ) -> <Transaction as Encodable>::Encoded
§impl FromWasmAbi for Transaction
impl FromWasmAbi for Transaction
§impl IntoWasmAbi for Transaction
impl IntoWasmAbi for Transaction
§impl LongRefFromWasmAbi for Transaction
impl LongRefFromWasmAbi for Transaction
§type Anchor = Ref<'static, Transaction>
type Anchor = Ref<'static, Transaction>
RefFromWasmAbi::Anchor
§unsafe fn long_ref_from_abi(
js: <Transaction as LongRefFromWasmAbi>::Abi
) -> <Transaction as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <Transaction as LongRefFromWasmAbi>::Abi ) -> <Transaction as LongRefFromWasmAbi>::Anchor
RefFromWasmAbi::ref_from_abi
§impl OptionFromWasmAbi for Transaction
impl OptionFromWasmAbi for Transaction
§fn is_none(abi: &<Transaction as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<Transaction as FromWasmAbi>::Abi) -> bool
None
, and otherwise it will be passed to
FromWasmAbi
.§impl OptionIntoWasmAbi for Transaction
impl OptionIntoWasmAbi for Transaction
§fn none() -> <Transaction as IntoWasmAbi>::Abi
fn none() -> <Transaction as IntoWasmAbi>::Abi
None
branch of this option. Read more§impl PartialEq for Transaction
impl PartialEq for Transaction
§fn eq(&self, other: &Transaction) -> bool
fn eq(&self, other: &Transaction) -> bool
self
and other
values to be equal, and is used
by ==
.§impl RefFromWasmAbi for Transaction
impl RefFromWasmAbi for Transaction
§type Anchor = Ref<'static, Transaction>
type Anchor = Ref<'static, Transaction>
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.§unsafe fn ref_from_abi(
js: <Transaction as RefFromWasmAbi>::Abi
) -> <Transaction as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <Transaction as RefFromWasmAbi>::Abi ) -> <Transaction as RefFromWasmAbi>::Anchor
§impl RefMutFromWasmAbi for Transaction
impl RefMutFromWasmAbi for Transaction
§type Anchor = RefMut<'static, Transaction>
type Anchor = RefMut<'static, Transaction>
RefFromWasmAbi::Anchor
§unsafe fn ref_mut_from_abi(
js: <Transaction as RefMutFromWasmAbi>::Abi
) -> <Transaction as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <Transaction as RefMutFromWasmAbi>::Abi ) -> <Transaction as RefMutFromWasmAbi>::Anchor
RefFromWasmAbi::ref_from_abi
§impl SerializableTransaction for Transaction
impl SerializableTransaction for Transaction
fn get_signature(&self) -> &Signature
fn get_recent_blockhash(&self) -> &Hash
fn uses_durable_nonce(&self) -> bool
§impl Serialize for Transaction
impl Serialize for Transaction
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl TryFrom<TransactionBuilder> for Transaction
impl TryFrom<TransactionBuilder> for Transaction
§impl TryFromJsValue for Transaction
impl TryFromJsValue for Transaction
§fn try_from_js_value(
value: JsValue
) -> Result<Transaction, <Transaction as TryFromJsValue>::Error>
fn try_from_js_value( value: JsValue ) -> Result<Transaction, <Transaction as TryFromJsValue>::Error>
§impl VectorFromWasmAbi for Transaction
impl VectorFromWasmAbi for Transaction
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <Transaction as VectorFromWasmAbi>::Abi ) -> Box<[Transaction]>
§impl VectorIntoWasmAbi for Transaction
impl VectorIntoWasmAbi for Transaction
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[Transaction]> ) -> <Transaction as VectorIntoWasmAbi>::Abi
impl Eq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.