pub enum Error {
InvalidInput,
Overflow,
OutOfRange,
InvalidModulus,
CompositeModulus,
NotCoprime,
StepBudgetExceeded,
}Expand description
Error type for deterministic prime and finite-field operations.
Variants§
InvalidInput
Malformed hexadecimal, decimal, or byte input.
Overflow
Value exceeds target fixed-width limb capacity.
OutOfRange
Input residue a does not satisfy 0 <= a < p.
InvalidModulus
Modulus is even or below the required threshold.
CompositeModulus
Modulus failed a compositeness or Euler criterion check.
NotCoprime
Progression residue a is not coprime to modulus q.
StepBudgetExceeded
Candidate scan exceeded the configured deterministic step cap.
Trait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
Available on crate feature
std only.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()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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