pub struct TransactionBuilder { /* private fields */ }
Expand description
A builder for constructing Solana transactions
Implementations§
Source§impl TransactionBuilder
impl TransactionBuilder
Sourcepub fn new(fee_payer: Pubkey, recent_blockhash: [u8; 32]) -> Self
pub fn new(fee_payer: Pubkey, recent_blockhash: [u8; 32]) -> Self
Create a new transaction builder
Sourcepub fn add_instruction(&mut self, instruction: Instruction) -> &mut Self
pub fn add_instruction(&mut self, instruction: Instruction) -> &mut Self
Add an instruction to the transaction
Sourcepub fn build(self) -> Result<Transaction>
pub fn build(self) -> Result<Transaction>
Build the transaction
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TransactionBuilder
impl RefUnwindSafe for TransactionBuilder
impl Send for TransactionBuilder
impl Sync for TransactionBuilder
impl Unpin for TransactionBuilder
impl UnwindSafe for TransactionBuilder
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