pub enum NttError {
InvalidSize(usize),
NotPrime(u64),
NotNttFriendly {
q: u64,
n: usize,
},
PrimeTooLarge(u64),
}Expand description
Errors returned by NTT context construction.
Variants§
InvalidSize(usize)
N must be a power of 2 >= 2.
NotPrime(u64)
q must be prime.
NotNttFriendly
q must satisfy q ≡ 1 (mod 2N) for NTT.
PrimeTooLarge(u64)
q must be < 2^28 for the 32-bit pipeline.
Trait Implementations§
impl Eq for NttError
Source§impl Error for NttError
Available on crate feature std only.
impl Error for NttError
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 NttError
Auto Trait Implementations§
impl Freeze for NttError
impl RefUnwindSafe for NttError
impl Send for NttError
impl Sync for NttError
impl Unpin for NttError
impl UnsafeUnpin for NttError
impl UnwindSafe for NttError
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