Enum sunscreen_zkp_backend::Error
source · pub enum Error {
BulletproofsR1CSError(Box<R1CSError>),
OutOfRange(Box<String>),
InputsMismatch(Box<String>),
IncorrectProofType,
GraphQueryError(GraphQueryError),
GadgetError(Box<String>),
MalformedZkpProgram(Box<String>),
UnsatisfiableConstraint(NodeIndex),
}
Expand description
An error in a ZKP backend.
Variants§
BulletproofsR1CSError(Box<R1CSError>)
Encountered an error when creating or verifying a Bulletproofs proof.
OutOfRange(Box<String>)
Encountered a value out of range for the field type in the chosen backend.
InputsMismatch(Box<String>)
The arguments given to a ZKP program don’t match what the program expects.
IncorrectProofType
Attempted to verify a proof incompatible with the given backend proof system.
GraphQueryError(GraphQueryError)
The program is malformed and caused a query failure.
GadgetError(Box<String>)
A gadget encountered an error.
MalformedZkpProgram(Box<String>)
The given program is malformed.
UnsatisfiableConstraint(NodeIndex)
A constraint could not be satisfied.
Implementations§
source§impl Error
impl Error
sourcepub fn out_of_range(val: &str) -> Self
pub fn out_of_range(val: &str) -> Self
Create an Error::OutOfRange
.
sourcepub fn gadget_error(msg: &str) -> Self
pub fn gadget_error(msg: &str) -> Self
Create an Error::GadgetError
.
sourcepub fn malformed_zkp_program(msg: &str) -> Self
pub fn malformed_zkp_program(msg: &str) -> Self
Create an Error::MalformedZkpProgram
.
sourcepub fn inputs_mismatch(msg: &str) -> Self
pub fn inputs_mismatch(msg: &str) -> Self
Create an Error::InputsMismatch
.
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)>
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 From<GraphQueryError> for Error
impl From<GraphQueryError> for Error
source§fn from(source: GraphQueryError) -> Self
fn from(source: GraphQueryError) -> Self
Converts to this type from the input type.
source§impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
impl Eq for Error
impl StructuralEq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.