pub struct InputBuilder(/* private fields */);Expand description
Enables building an Input using the standard builder pattern.
Implementations§
Source§impl InputBuilder
impl InputBuilder
Sourcepub fn new(previous_output: &OutPoint) -> Self
pub fn new(previous_output: &OutPoint) -> Self
Creates a new builder that can be used to build an Input that spends previous_output.
Sourcepub fn minimum_required_time_based_lock_time(self, lock: Time) -> Self
pub fn minimum_required_time_based_lock_time(self, lock: Time) -> Self
Sets the Input::min_time field.
Sourcepub fn minimum_required_height_based_lock_time(self, lock: Height) -> Self
pub fn minimum_required_height_based_lock_time(self, lock: Height) -> Self
Sets the Input::min_height field.
Sourcepub fn segwit_fund(self, utxo: TxOut) -> Self
pub fn segwit_fund(self, utxo: TxOut) -> Self
Funds this input with a segwit UTXO.
Sourcepub fn legacy_fund(self, tx: Transaction) -> Self
pub fn legacy_fund(self, tx: Transaction) -> Self
Funds this input with a legacy UTXO.
Caller to guarantee that this tx is correct for this input (i.e., has a txid equal to
self.previous_txid).
Auto Trait Implementations§
impl Freeze for InputBuilder
impl RefUnwindSafe for InputBuilder
impl Send for InputBuilder
impl Sync for InputBuilder
impl Unpin for InputBuilder
impl UnsafeUnpin for InputBuilder
impl UnwindSafe for InputBuilder
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