mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 13:07:46 +00:00
factor::numeric::DoubleInt: Document the DoubleWidth associated type
This commit is contained in:
parent
17c69674eb
commit
9a80ab7741
1 changed files with 4 additions and 0 deletions
|
@ -217,11 +217,15 @@ pub(crate) trait Int:
|
|||
{
|
||||
fn as_u64(&self) -> u64;
|
||||
fn from_u64(n: u64) -> Self;
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
fn as_u128(&self) -> u128;
|
||||
}
|
||||
|
||||
pub(crate) trait DoubleInt: Int {
|
||||
/// An integer type with twice the width of `Self`.
|
||||
/// In particular, multiplications (of `Int` values) can be performed in
|
||||
/// `Self::DoubleWidth` without possibility of overflow.
|
||||
type DoubleWidth: Int;
|
||||
|
||||
fn as_double_width(self) -> Self::DoubleWidth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue