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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
use crate::StaticNode;

/********* atoms **********/

impl From<bool> for StaticNode {
    #[inline]
    #[must_use]
    fn from(b: bool) -> Self {
        Self::Bool(b)
    }
}

impl From<()> for StaticNode {
    #[inline]
    #[must_use]
    fn from(_b: ()) -> Self {
        Self::Null
    }
}

/********* i_ **********/
impl From<i8> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: i8) -> Self {
        Self::I64(i64::from(i))
    }
}

impl From<i16> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: i16) -> Self {
        Self::I64(i64::from(i))
    }
}

impl From<i32> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: i32) -> Self {
        Self::I64(i64::from(i))
    }
}

impl From<i64> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: i64) -> Self {
        Self::I64(i)
    }
}
#[cfg(feature = "128bit")]
impl From<i128> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: i128) -> Self {
        Self::I128(i)
    }
}

/********* u_ **********/
impl From<u8> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: u8) -> Self {
        Self::U64(u64::from(i))
    }
}

impl From<u16> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: u16) -> Self {
        Self::U64(u64::from(i))
    }
}

impl From<u32> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: u32) -> Self {
        Self::U64(u64::from(i))
    }
}

impl From<u64> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: u64) -> Self {
        Self::U64(i)
    }
}

#[cfg(feature = "128bit")]
impl From<u128> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: u128) -> Self {
        Self::U128(i)
    }
}

impl From<usize> for StaticNode {
    #[inline]
    #[must_use]
    fn from(i: usize) -> Self {
        Self::U64(i as u64)
    }
}

/********* f_ **********/
impl From<f32> for StaticNode {
    #[inline]
    #[must_use]
    fn from(f: f32) -> Self {
        Self::F64(f64::from(f))
    }
}

impl From<f64> for StaticNode {
    #[inline]
    #[must_use]
    fn from(f: f64) -> Self {
        Self::F64(f)
    }
}