pub trait ReduceNonZero<UInt: Integer + ArrayEncoding>: Sized {
// Required method
fn from_uint_reduced_nonzero(n: UInt) -> Self;
}
Expand description
Modular reduction to a non-zero output.
This trait is primarily intended for use by curve implementations such
as the k256
and p256
crates.
End users should use the Reduce
impl on
NonZeroScalar
instead.
Required Methods§
Sourcefn from_uint_reduced_nonzero(n: UInt) -> Self
fn from_uint_reduced_nonzero(n: UInt) -> Self
Perform a modular reduction, returning a field element.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.