#[non_exhaustive]pub enum Error {
Hash(HashError),
Order,
HashSum,
}Expand description
Errors applicable to constructing and verifying Equi-X puzzles
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Hash(HashError)
Errors inherited from hashx
Notably, HashError::ProgramConstraints needs to be handled
by any program which generates new challenge strings, and
HashError::Compiler may show up if you’ve chosen
crate::RuntimeOption::CompileOnly via crate::EquiXBuilder.
Order
A solution does not meet Equi-X’s ordering requirements.
This error occurs independently of the specific challenge string. The lexicographic ordering constraints of a well formed Equi-X solution were not met.
HashSum
Failed hash sum verification of a challenge and solution.
The tree of hash sums computed from the solution and challenge are required to have a number of low bits zeroed on each level. One of these tests failed, and the solution is not valid.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()