1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! This module provides functions for converting between different numeric types.
use Nat;
use U256;
use ToPrimitive;
/// Converts a `Nat` to a `U256`.
///
/// # Arguments
///
/// * `n` - The `Nat` to convert.
///
/// # Returns
///
/// The `U256` representation of the `Nat`.
///
/// # Panics
///
/// This function will panic if the value is too large to fit in a `U256`.
/// Converts a `Nat` to a `u128`.
///
/// # Arguments
///
/// * `n` - The `Nat` to convert.
///
/// # Returns
///
/// The `u128` representation of the `Nat`.
///
/// # Panics
///
/// This function will panic if the value is too large to fit in a `u128`.