Struct algonaut_transaction::builder::TxnBuilder
source · [−]pub struct TxnBuilder { /* private fields */ }
Expand description
A builder for Transaction.
Implementations
sourceimpl TxnBuilder
impl TxnBuilder
sourcepub fn with(
params: &SuggestedTransactionParams,
txn_type: TransactionType
) -> Self
pub fn with(
params: &SuggestedTransactionParams,
txn_type: TransactionType
) -> Self
sourcepub fn with_fee(
params: &SuggestedTransactionParams,
fee: TxnFee,
txn_type: TransactionType
) -> Self
pub fn with_fee(
params: &SuggestedTransactionParams,
fee: TxnFee,
txn_type: TransactionType
) -> Self
Convenience to initialize builder with suggested transaction params, and set the fee manually (ignoring the fee fields in params). Useful e.g. in txns groups where one txn pays the fee for others.
pub fn new(
fee: TxnFee,
first_valid: Round,
last_valid: Round,
genesis_hash: HashDigest,
txn_type: TransactionType
) -> Self
pub fn genesis_id(self, id: String) -> Self
pub fn group(self, group: HashDigest) -> Self
pub fn lease(self, lease: HashDigest) -> Self
pub fn note(self, note: Vec<u8>) -> Self
pub fn rekey_to(self, rekey_to: Address) -> Self
pub fn build(self) -> Result<Transaction, TransactionError>
Auto Trait Implementations
impl RefUnwindSafe for TxnBuilder
impl Send for TxnBuilder
impl Sync for TxnBuilder
impl Unpin for TxnBuilder
impl UnwindSafe for TxnBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more