pub enum ConsensusError {
Show 13 variants
TransactionValidation(Cow<'static, str>),
BlockValidation(Cow<'static, str>),
ScriptExecution(Cow<'static, str>),
ScriptErrorWithCode {
code: ScriptErrorCode,
message: Cow<'static, str>,
},
UtxoNotFound(Cow<'static, str>),
InvalidSignature(Cow<'static, str>),
InvalidProofOfWork(Cow<'static, str>),
EconomicValidation(Cow<'static, str>),
Serialization(Cow<'static, str>),
ConsensusRuleViolation(Cow<'static, str>),
InvalidSighashType(u8),
InvalidInputIndex(usize),
InvalidPrevoutsCount(usize, usize),
}Variants§
TransactionValidation(Cow<'static, str>)
BlockValidation(Cow<'static, str>)
ScriptExecution(Cow<'static, str>)
ScriptErrorWithCode
Script failed with a detailed error code.
This variant is preferred for new code that needs precise, libbitcoin-compatible
error reporting. Older callers can continue to use the ScriptExecution variant.
UtxoNotFound(Cow<'static, str>)
InvalidSignature(Cow<'static, str>)
InvalidProofOfWork(Cow<'static, str>)
EconomicValidation(Cow<'static, str>)
Serialization(Cow<'static, str>)
ConsensusRuleViolation(Cow<'static, str>)
InvalidSighashType(u8)
InvalidInputIndex(usize)
InvalidPrevoutsCount(usize, usize)
Trait Implementations§
Source§impl Clone for ConsensusError
impl Clone for ConsensusError
Source§fn clone(&self) -> ConsensusError
fn clone(&self) -> ConsensusError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConsensusError
impl Debug for ConsensusError
Source§impl Display for ConsensusError
impl Display for ConsensusError
Source§impl Error for ConsensusError
impl Error for ConsensusError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ConsensusError
impl PartialEq for ConsensusError
impl StructuralPartialEq for ConsensusError
Auto Trait Implementations§
impl Freeze for ConsensusError
impl RefUnwindSafe for ConsensusError
impl Send for ConsensusError
impl Sync for ConsensusError
impl Unpin for ConsensusError
impl UnsafeUnpin for ConsensusError
impl UnwindSafe for ConsensusError
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