pub struct TransactionOutputBuilder { /* private fields */ }
Expand description
We introduce a builder-pattern format for creating transaction outputs This is because:
- Some fields (i.e. data hash) are optional, and we can’t easily expose Option<> in WASM
- Some fields like amounts have many ways it could be set (some depending on other field values being known)
- Easier to adapt as the output format gets more complicated in future Cardano releases
Implementations§
source§impl TransactionOutputBuilder
impl TransactionOutputBuilder
pub fn new() -> Self
pub fn with_address(&self, address: &Address) -> Self
pub fn with_data_hash(&self, data_hash: &DataHash) -> Self
pub fn with_plutus_data(&self, data: &PlutusData) -> Self
pub fn with_script_ref(&self, script_ref: &ScriptRef) -> Self
pub fn next(&self) -> Result<TransactionOutputAmountBuilder, JsError>
Trait Implementations§
source§impl Clone for TransactionOutputBuilder
impl Clone for TransactionOutputBuilder
source§fn clone(&self) -> TransactionOutputBuilder
fn clone(&self) -> TransactionOutputBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for TransactionOutputBuilder
impl Send for TransactionOutputBuilder
impl Sync for TransactionOutputBuilder
impl Unpin for TransactionOutputBuilder
impl UnwindSafe for TransactionOutputBuilder
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