Struct ckb_types::core::TransactionBuilder
source · [−]pub struct TransactionBuilder { /* private fields */ }
Expand description
An advanced builder for TransactionView
.
Base on packed::TransactionBuilder
but added lots of syntactic sugar.
Implementations
sourceimpl TransactionBuilder
impl TransactionBuilder
sourcepub fn cell_deps<T>(self, v: T) -> Self where
T: IntoIterator<Item = CellDep>,
pub fn cell_deps<T>(self, v: T) -> Self where
T: IntoIterator<Item = CellDep>,
Extends cell_deps
with the contents of an iterator.
sourcepub fn set_cell_deps(self, v: Vec<CellDep>) -> Self
pub fn set_cell_deps(self, v: Vec<CellDep>) -> Self
Sets cell_deps
.
sourcepub fn header_dep(self, v: Byte32) -> Self
pub fn header_dep(self, v: Byte32) -> Self
Pushes an item into header_deps
.
sourcepub fn header_deps<T>(self, v: T) -> Self where
T: IntoIterator<Item = Byte32>,
pub fn header_deps<T>(self, v: T) -> Self where
T: IntoIterator<Item = Byte32>,
Extends header_deps
with the contents of an iterator.
sourcepub fn set_header_deps(self, v: Vec<Byte32>) -> Self
pub fn set_header_deps(self, v: Vec<Byte32>) -> Self
Sets header_deps
.
sourcepub fn inputs<T>(self, v: T) -> Self where
T: IntoIterator<Item = CellInput>,
pub fn inputs<T>(self, v: T) -> Self where
T: IntoIterator<Item = CellInput>,
Extends inputs
with the contents of an iterator.
sourcepub fn set_inputs(self, v: Vec<CellInput>) -> Self
pub fn set_inputs(self, v: Vec<CellInput>) -> Self
Sets inputs
.
sourcepub fn output(self, v: CellOutput) -> Self
pub fn output(self, v: CellOutput) -> Self
Pushes an item into outputs
.
sourcepub fn outputs<T>(self, v: T) -> Self where
T: IntoIterator<Item = CellOutput>,
pub fn outputs<T>(self, v: T) -> Self where
T: IntoIterator<Item = CellOutput>,
Extends outputs
with the contents of an iterator.
sourcepub fn set_outputs(self, v: Vec<CellOutput>) -> Self
pub fn set_outputs(self, v: Vec<CellOutput>) -> Self
Sets outputs
.
sourcepub fn witnesses<T>(self, v: T) -> Self where
T: IntoIterator<Item = Bytes>,
pub fn witnesses<T>(self, v: T) -> Self where
T: IntoIterator<Item = Bytes>,
Extends witnesses
with the contents of an iterator.
sourcepub fn set_witnesses(self, v: Vec<Bytes>) -> Self
pub fn set_witnesses(self, v: Vec<Bytes>) -> Self
Sets witnesses
.
sourcepub fn output_data(self, v: Bytes) -> Self
pub fn output_data(self, v: Bytes) -> Self
Pushes an item into outputs_data
.
sourcepub fn outputs_data<T>(self, v: T) -> Self where
T: IntoIterator<Item = Bytes>,
pub fn outputs_data<T>(self, v: T) -> Self where
T: IntoIterator<Item = Bytes>,
Extends outputs_data
with the contents of an iterator.
sourcepub fn set_outputs_data(self, v: Vec<Bytes>) -> Self
pub fn set_outputs_data(self, v: Vec<Bytes>) -> Self
Sets outputs_data
.
sourcepub fn build(self) -> TransactionView
pub fn build(self) -> TransactionView
Converts into TransactionView
.
Trait Implementations
sourceimpl Clone for TransactionBuilder
impl Clone for TransactionBuilder
sourcefn clone(&self) -> TransactionBuilder
fn clone(&self) -> TransactionBuilder
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
sourceimpl Debug for TransactionBuilder
impl Debug for TransactionBuilder
Auto Trait Implementations
impl RefUnwindSafe for TransactionBuilder
impl Send for TransactionBuilder
impl Sync for TransactionBuilder
impl Unpin for TransactionBuilder
impl UnwindSafe for TransactionBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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