pub trait Factor<S> {
const FACTORS: Factorization;
}
Expand description
Types that have a size or order which can be expressed as a product of prime powers.
The type parameter S
is a phantom type to allow users of this library to provide their own
factorizations for FpNum<P>
, QuadNum<P>
, etc. for arbitrary P
.
The type S
must come from the crate implementing the factorization to satisfy Rust’s
coherence and orphan rules, but does not affect the memory layout of any instance of an object
implementing Factor
.
See the Rust documentation on coherence and the orphan rule.
This type can only hold factors up to 2^126
. Behavior may be undefined for factorizations
which contain larger factors.
Required Associated Constants§
sourceconst FACTORS: Factorization
const FACTORS: Factorization
The prime factorization of this object.