pub enum Error {
Show variants
InvalidMagic,
InvalidSeparator,
InvalidKey(Key),
InvalidProprietaryKey,
DuplicateKey(Key),
UnsignedTxHasScriptSigs,
UnsignedTxHasScriptWitnesses,
MustHaveUnsignedTx,
NoMorePairs,
UnexpectedUnsignedTx {
expected: Transaction,
actual: Transaction,
},
NonStandardSigHashType(u32),
HashParseError(Error),
InvalidPreimageHashPair {
hash_type: PsbtHash,
preimage: Vec<u8>,
hash: Vec<u8>,
},
MergeConflict(String),
ConsensusEncoding,
}
Ways that a Partially Signed Transaction might fail.
Magic bytes for a PSBT must be the ASCII for “psbt” serialized in most
significant byte order.
The separator for a PSBT must be 0xff
.
Known keys must be according to spec.
Non-proprietary key type found when proprietary key was expected
Keys within key-value map should never be duplicated.
The scriptSigs for the unsigned transaction must be empty.
The scriptWitnesses for the unsigned transaction must be empty.
A PSBT must have an unsigned transaction.
Signals that there are no more key-value pairs in a key-value map.
Attempting to merge with a PSBT describing a different unsigned
transaction.
Show fields
Fields of UnexpectedUnsignedTx
NonStandardSigHashType(u32)
Unable to parse as a standard SigHash type.
Parsing errors from bitcoin_hashes
The pre-image must hash to the correponding psbt hash
Show fields
Fields of InvalidPreimageHashPair
Data inconsistency/conflicting data during merge procedure
Serialization error in bitcoin consensus-encoded structures
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
🔬 This is a nightly-only experimental API. (backtrace
)
Returns a stack backtrace, if available, of where this error occurred. Read more
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
👎 Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
#[must_use]
pub fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
#[must_use]
pub fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
#[must_use]
pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
Restrict a value to a certain interval. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]
pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
[src]
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.