pub struct Constructor<T>(/* private fields */);Expand description
Implements the BIP-370 Constructor role.
Uses the builder pattern, and generics to make adding inputs and outputs infallible.
Implementations§
Source§impl<T: Mod> Constructor<T>
impl<T: Mod> Constructor<T>
Sourcepub fn no_more_inputs(self) -> Self
pub fn no_more_inputs(self) -> Self
Marks that the Psbt can not have any more inputs added to it.
Sourcepub fn no_more_outputs(self) -> Self
pub fn no_more_outputs(self) -> Self
Marks that the Psbt can not have any more outputs added to it.
Source§impl Constructor<Modifiable>
impl Constructor<Modifiable>
Sourcepub fn new(psbt: Psbt) -> Result<Self, PsbtNotModifiableError>
pub fn new(psbt: Psbt) -> Result<Self, PsbtNotModifiableError>
Creates a new Constructor.
This function should only be needed if the PSBT Creator and Constructor roles are being
performed by separate entities, if not use one of the builder functions on the Creator
e.g., constructor_modifiable().
Source§impl Constructor<InputsOnlyModifiable>
impl Constructor<InputsOnlyModifiable>
Sourcepub fn new(psbt: Psbt) -> Result<Self, InputsNotModifiableError>
pub fn new(psbt: Psbt) -> Result<Self, InputsNotModifiableError>
Creates a new Constructor.
This function should only be needed if the PSBT Creator and Constructor roles are being
performed by separate entities, if not use one of the builder functions on the Creator
e.g., constructor_modifiable().
Source§impl Constructor<OutputsOnlyModifiable>
impl Constructor<OutputsOnlyModifiable>
Sourcepub fn new(psbt: Psbt) -> Result<Self, OutputsNotModifiableError>
pub fn new(psbt: Psbt) -> Result<Self, OutputsNotModifiableError>
Creates a new Constructor.
This function should only be needed if the PSBT Creator and Constructor roles are being
performed by separate entities, if not use one of the builder functions on the Creator
e.g., constructor_modifiable().
Trait Implementations§
Source§impl<T: Clone> Clone for Constructor<T>
impl<T: Clone> Clone for Constructor<T>
Source§fn clone(&self) -> Constructor<T>
fn clone(&self) -> Constructor<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more