TransactionBuilder

Trait TransactionBuilder 

Source
pub trait TransactionBuilder {
    // Required methods
    fn from(&mut self, address: Address) -> &mut Self;
    fn to(&mut self, address: Address) -> &mut Self;
    fn amount(&mut self, amount: u128) -> &mut Self;
    fn build(&self) -> Result<Vec<u8>, String>;
}
Expand description

Transaction builder trait

Required Methods§

Source

fn from(&mut self, address: Address) -> &mut Self

Set the sender address

Source

fn to(&mut self, address: Address) -> &mut Self

Set the recipient address

Source

fn amount(&mut self, amount: u128) -> &mut Self

Set the amount

Source

fn build(&self) -> Result<Vec<u8>, String>

Build the transaction

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§