num-bigint
num-bigint copied to clipboard
Feature Request: Ref type for {BigInt|BigUint}
Propose to introduce the BigIntRef
and BigUintRef
type, and the definition should be:
struct BigUintRef<'a> {
data: &'a [BigDigit],
}
struct BigIntRef<'a> {
sign: Sign,
data: BigUintRef<'a>,
}
And implement all ops on them.
The feature is useful when we want to store a list of BigInt or BigUint in a flatten memory and apply op on them without a whole clone.