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
sourceimpl 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 next(&self) -> Result<TransactionOutputAmountBuilder, JsError>
Trait Implementations
sourceimpl Clone for TransactionOutputBuilder
impl Clone for TransactionOutputBuilder
sourcefn clone(&self) -> TransactionOutputBuilder
fn clone(&self) -> TransactionOutputBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for TransactionOutputBuilder
impl Send for TransactionOutputBuilder
impl Sync for TransactionOutputBuilder
impl Unpin for TransactionOutputBuilder
impl UnwindSafe for TransactionOutputBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more