TransactionBuilder

Struct TransactionBuilder 

Source
pub struct TransactionBuilder<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> TransactionBuilder<'a>

Source

pub fn build() -> Self

Source

pub fn instructions(&mut self, instructions: Vec<Instruction>) -> &mut Self

Set the entire list of instructions for the transaction

Source

pub fn instruction(&mut self, instruction: Instruction) -> &mut Self

Add an instruction to the transaction

Source

pub fn signer(&mut self, signer: &'a Keypair) -> &mut Self

Add a signer to the transaction

Source

pub fn payer(&mut self, payer: &'a Pubkey) -> &mut Self

Set the payer for the transaction

Source

pub fn recent_blockhash(&mut self, recent_blockhash: Hash) -> &mut Self

Set the recent blockhash for the transaction

Source

pub fn transaction(&self) -> Transaction

Build the transaction

Auto Trait Implementations§

§

impl<'a> Freeze for TransactionBuilder<'a>

§

impl<'a> RefUnwindSafe for TransactionBuilder<'a>

§

impl<'a> Send for TransactionBuilder<'a>

§

impl<'a> Sync for TransactionBuilder<'a>

§

impl<'a> Unpin for TransactionBuilder<'a>

§

impl<'a> UnwindSafe for TransactionBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V