#[non_exhaustive]
pub enum Error {
Io(ErrorKind),
IndexOutOfInputsBounds {
index: usize,
inputs_size: usize,
},
SingleWithoutCorrespondingOutput {
index: usize,
outputs_size: usize,
},
PrevoutsSize,
PrevoutIndex,
PrevoutKind,
WrongAnnex,
InvalidSighashType(u32),
}
Expand description
Possible errors in computing the signature message.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Io(ErrorKind)
Could happen only by using *_encode_signing_*
methods with custom writers, engines writers
like the ones used in methods *_signature_hash
do not error.
IndexOutOfInputsBounds
Requested index is greater or equal than the number of inputs in the transaction.
SingleWithoutCorrespondingOutput
Using SIGHASH_SINGLE
without a “corresponding output” (an output with the same index as
the input being verified) is a validation failure.
PrevoutsSize
There are mismatches in the number of prevouts provided compared to the number of inputs in the transaction.
PrevoutIndex
Requested a prevout index which is greater than the number of prevouts provided or a
Prevouts::One
with different index.
PrevoutKind
A single prevout has been provided but all prevouts are needed unless using
SIGHASH_ANYONECANPAY
.
WrongAnnex
Annex must be at least one byte long and the first bytes must be 0x50
.
InvalidSighashType(u32)
Invalid Sighash type.
Trait Implementations
sourceimpl Error for Error
Available on crate feature std
only.
impl Error for Error
std
only.sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
sourceimpl Ord for Error
impl Ord for Error
1.21.0 · sourceconst fn max(self, other: Self) -> Selfwhere
Self: Sized,
const fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourceconst fn min(self, other: Self) -> Selfwhere
Self: Sized,
const fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialOrd<Error> for Error
impl PartialOrd<Error> for Error
sourcefn partial_cmp(&self, other: &Error) -> Option<Ordering>
fn partial_cmp(&self, other: &Error) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more