Debian Codegraph @

src/lib.rs

raw symbols SCIP
1 /*! `fun`damental `ty`pes
2
3 This crate provides trait unification of the Rust fundamental items, allowing
4 users to declare the behavior they want from a number without committing to a
5 single particular numeric type.
6
7 The number types can be categorized along two axes: behavior and width. Traits
8 for each axis and group on that axis are provided:
9
10 ## Numeric Categories
11
12 The most general category is represented by the trait [`Numeric`]. It is
13 implemented by all the numeric fundamentals, and includes only the traits that
14 they all implement. This is an already-large amount: basic memory management,
15 comparison, rendering, and numeric arithmetic.
16
17 The numbers are then split into [`Floating`] and [`Integral`]. The former fills
18 out the API of `f32` and `f64`, while the latter covers all of the `iN` and `uN`
19 numbers.
20
21 Lastly, [`Integral`] splits further, into [`Signed`] and [`Unsigned`]. These
22 provide the last specializations unique to the differences between `iN` and
23 `uN`.
24
25 ## Width Categories
26
27 Every number implements the trait `IsN` for the `N` of its bit width. `isize`
28 and `usize` implement the trait that matches their width on the target platform.
29
30 In addition, the trait groups `AtLeastN` and `AtMostN` enable clamping the range
31 of acceptable widths to lower or upper bounds. These traits are equivalent to
32 `mem::size_of::<T>() >= N` and `mem::size_of::<T>() <= N`, respectively.
33
34 [`Floating`]: trait.Floating.html
35 [`Integral`]: trait.Integral.html
36 [`Numeric`]: trait.Numeric.html
37 [`Signed`]: trait.Signed.html
38 [`Unsigned`]: trait.Unsigned.html
39 !*/
40
41 #![cfg_attr(not(feature = "std"), no_std)]
42 #![deny(unconditional_recursion)]
43
44 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::{
45 convertrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/::{
46 TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#,
47 TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#,
48 },
49 fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::{
50 Binaryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Binary#,
51 Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug#,
52 Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#,
53 LowerExprust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/LowerExp#,
54 LowerHexrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/LowerHex#,
55 Octalrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Octal#,
56 UpperExprust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/UpperExp#,
57 UpperHexrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/UpperHex#,
58 },
59 hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/::Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#,
60 iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/::{
61 Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product#,
62 Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#,
63 },
64 numrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/::{
65 FpCategoryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/FpCategory#,
66 ParseIntErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/error/ParseIntError#,
67 },
68 opsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/::{
69 Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#,
70 AddAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#,
71 BitAndrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAnd#,
72 BitAndAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAndAssign#,
73 BitOrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOr#,
74 BitOrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOrAssign#,
75 BitXorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXor#,
76 BitXorAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXorAssign#,
77 Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#,
78 DivAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/DivAssign#,
79 Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#,
80 MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#,
81 Negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#,
82 Notrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Not#,
83 Remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Rem#,
84 RemAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/RemAssign#,
85 Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#,
86 ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#,
87 Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#,
88 ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#,
89 Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#,
90 SubAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/SubAssign#,
91 },
92 strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/::FromStrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/traits/FromStr#,
93 };
94
95 /// Declare that a type is one of the language fundamental types.
96 pub trait Fundamentalrust-analyzer cargo funty 2.0.0 Fundamental#:
97 'static
98 + Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#
99 + Sendrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Send#
100 + Syncrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sync#
101 + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#
102 + Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone#
103 + Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy#
104 + Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#
105 + FromStrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/traits/FromStr#
106 // cmp
107 + PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq#<Self>
108 + PartialOrdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialOrd#<Self>
109 // fmt
110 + Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Debug#
111 + Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#
112 {
113 /// Tests `self != 0`.
114 fn as_boolrust-analyzer cargo funty 2.0.0 Fundamental#as_bool().(self) -> bool;
115
116 /// Represents `self` as a Unicode Scalar Value, if possible.
117 fn as_charrust-analyzer cargo funty 2.0.0 Fundamental#as_char().(self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<char>;
118
119 /// Performs `self as i8`.
120 fn as_i8rust-analyzer cargo funty 2.0.0 Fundamental#as_i8().(self) -> i8;
121
122 /// Performs `self as i16`.
123 fn as_i16rust-analyzer cargo funty 2.0.0 Fundamental#as_i16().(self) -> i16;
124
125 /// Performs `self as i32`.
126 fn as_i32rust-analyzer cargo funty 2.0.0 Fundamental#as_i32().(self) -> i32;
127
128 /// Performs `self as i64`.
129 fn as_i64rust-analyzer cargo funty 2.0.0 Fundamental#as_i64().(self) -> i64;
130
131 /// Performs `self as i128`.
132 fn as_i128rust-analyzer cargo funty 2.0.0 Fundamental#as_i128().(self) -> i128;
133
134 /// Performs `self as isize`.
135 fn as_isizerust-analyzer cargo funty 2.0.0 Fundamental#as_isize().(self) -> isize;
136
137 /// Performs `self as u8`.
138 fn as_u8rust-analyzer cargo funty 2.0.0 Fundamental#as_u8().(self) -> u8;
139
140 /// Performs `self as u16`.
141 fn as_u16rust-analyzer cargo funty 2.0.0 Fundamental#as_u16().(self) -> u16;
142
143 /// Performs `self as u32`.
144 fn as_u32rust-analyzer cargo funty 2.0.0 Fundamental#as_u32().(self) -> u32;
145
146 /// Performs `self as u64`.
147 fn as_u64rust-analyzer cargo funty 2.0.0 Fundamental#as_u64().(self) -> u64;
148
149 /// Performs `self as u128`.
150 fn as_u128rust-analyzer cargo funty 2.0.0 Fundamental#as_u128().(self) -> u128;
151
152 /// Performs `self as usize`.
153 fn as_usizerust-analyzer cargo funty 2.0.0 Fundamental#as_usize().(self) -> usize;
154
155 /// Performs `self as f32`.
156 fn as_f32rust-analyzer cargo funty 2.0.0 Fundamental#as_f32().(self) -> f32;
157
158 /// Performs `self as f64`.
159 fn as_f64rust-analyzer cargo funty 2.0.0 Fundamental#as_f64().(self) -> f64;
160 }
161
162 /// Declare that a type is an abstract number.
163 ///
164 /// This unifies all of the signed-integer, unsigned-integer, and floating-point
165 /// types.
166 pub trait Numericrust-analyzer cargo funty 2.0.0 Numeric#:
167 Fundamentalrust-analyzer cargo funty 2.0.0 Fundamental#
168 // iter
169 + Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product#<Self>
170 + for<'a> Productrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Product#<&'a Self>
171 + Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#<Self>
172 + for<'a> Sumrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/accum/Sum#<&'a Self>
173 // numeric ops
174 + Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#<Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#Output# = Self>
175 + for<'a> Addrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#<&'a Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Add#Output# = Self>
176 + AddAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#<Self>
177 + for<'a> AddAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/AddAssign#<&'a Self>
178 + Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#<Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#Output# = Self>
179 + for<'a> Subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#<&'a Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Sub#Output# = Self>
180 + SubAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/SubAssign#<Self>
181 + for<'a> SubAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/SubAssign#<&'a Self>
182 + Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# = Self>
183 + for<'a> Mulrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#<&'a Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Mul#Output# = Self>
184 + MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<Self>
185 + for<'a> MulAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/MulAssign#<&'a Self>
186 + Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#<Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#Output# = Self>
187 + for<'a> Divrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#<&'a Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Div#Output# = Self>
188 + DivAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/DivAssign#<Self>
189 + for<'a> DivAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/DivAssign#<&'a Self>
190 + Remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Rem#<Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Rem#Output# = Self>
191 + for<'a> Remrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Rem#<&'a Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Rem#Output# = Self>
192 + RemAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/RemAssign#<Self>
193 + for<'a> RemAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/RemAssign#<&'a Self>
194 {
195 /// The `[u8; N]` byte array that stores values of `Self`.
196 type Bytesrust-analyzer cargo funty 2.0.0 Numeric#Bytes#;
197
198 /// Return the memory representation of this number as a byte array in
199 /// big-endian (network) byte order.
200 fn to_be_bytesrust-analyzer cargo funty 2.0.0 Numeric#to_be_bytes().(self) -> Self::Bytesrust-analyzer cargo funty 2.0.0 Numeric#Bytes#;
201
202 /// Return the memory representation of this number as a byte array in
203 /// little-endian byte order.
204 fn to_le_bytesrust-analyzer cargo funty 2.0.0 Numeric#to_le_bytes().(self) -> Self::Bytesrust-analyzer cargo funty 2.0.0 Numeric#Bytes#;
205
206 /// Return the memory representation of this number as a byte array in
207 /// native byte order.
208 fn to_ne_bytesrust-analyzer cargo funty 2.0.0 Numeric#to_ne_bytes().(self) -> Self::Bytesrust-analyzer cargo funty 2.0.0 Numeric#Bytes#;
209
210 /// Create a numeric value from its representation as a byte array in big
211 /// endian.
212 fn from_be_bytesrust-analyzer cargo funty 2.0.0 Numeric#from_be_bytes().(bytes: Self::Bytesrust-analyzer cargo funty 2.0.0 Numeric#Bytes#) -> Self;
213
214 /// Create a numeric value from its representation as a byte array in little
215 /// endian.
216 fn from_le_bytesrust-analyzer cargo funty 2.0.0 Numeric#from_le_bytes().(bytes: Self::Bytesrust-analyzer cargo funty 2.0.0 Numeric#Bytes#) -> Self;
217
218 /// Create a numeric value from its memory representation as a byte array in
219 /// native endianness.
220 fn from_ne_bytesrust-analyzer cargo funty 2.0.0 Numeric#from_ne_bytes().(bytes: Self::Bytesrust-analyzer cargo funty 2.0.0 Numeric#Bytes#) -> Self;
221 }
222
223 /// Declare that a type is a fixed-point integer.
224 ///
225 /// This unifies all of the signed and unsigned integral types.
226 pub trait Integralrust-analyzer cargo funty 2.0.0 Integral#:
227 Numericrust-analyzer cargo funty 2.0.0 Numeric#
228 + Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#
229 + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq#
230 + Ordrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Ord#
231 + Binaryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Binary#
232 + LowerHexrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/LowerHex#
233 + UpperHexrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/UpperHex#
234 + Octalrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Octal#
235 + BitAndrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAnd#<Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAnd#Output# = Self>
236 + for<'a> BitAndrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAnd#<&'a Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAnd#Output# = Self>
237 + BitAndAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAndAssign#<Self>
238 + for<'a> BitAndAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitAndAssign#<&'a Self>
239 + BitOrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOr#<Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOr#Output# = Self>
240 + for<'a> BitOrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOr#<&'a Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOr#Output# = Self>
241 + BitOrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOrAssign#<Self>
242 + for<'a> BitOrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitOrAssign#<&'a Self>
243 + BitXorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXor#<Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXor#Output# = Self>
244 + for<'a> BitXorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXor#<&'a Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXor#Output# = Self>
245 + BitXorAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXorAssign#<Self>
246 + for<'a> BitXorAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/BitXorAssign#<&'a Self>
247 + Notrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Not#<Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Not#Output# = Self>
248 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<i8>
249 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<u8>
250 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<i16>
251 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<u16>
252 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<i32>
253 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<u32>
254 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<i64>
255 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<u64>
256 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<i128>
257 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<u128>
258 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<isize>
259 + TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<usize>
260 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<i8>
261 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<u8>
262 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<i16>
263 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<u16>
264 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<i32>
265 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<u32>
266 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<i64>
267 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<u64>
268 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<i128>
269 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<u128>
270 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<isize>
271 + TryIntorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#<usize>
272 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
273 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
274 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<Self>
275 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a Self>
276 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
277 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a Self, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
278 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<Self>
279 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a Self>
280 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<i8, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
281 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a i8, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
282 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<i8>
283 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a i8>
284 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<i8, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
285 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a i8, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
286 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<i8>
287 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a i8>
288 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<u8, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
289 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a u8, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
290 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<u8>
291 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a u8>
292 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<u8, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
293 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a u8, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
294 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<u8>
295 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a u8>
296 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<i16, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
297 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a i16, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
298 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<i16>
299 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a i16>
300 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<i16, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
301 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a i16, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
302 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<i16>
303 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a i16>
304 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<u16, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
305 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a u16, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
306 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<u16>
307 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a u16>
308 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<u16, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
309 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a u16, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
310 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<u16>
311 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a u16>
312 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<i32, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
313 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a i32, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
314 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<i32>
315 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a i32>
316 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<i32, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
317 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a i32, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
318 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<i32>
319 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a i32>
320 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<u32, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
321 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a u32, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
322 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<u32>
323 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a u32>
324 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<u32, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
325 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a u32, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
326 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<u32>
327 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a u32>
328 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<i64, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
329 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a i64, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
330 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<i64>
331 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a i64>
332 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<i64, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
333 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a i64, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
334 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<i64>
335 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a i64>
336 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<u64, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
337 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a u64, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
338 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<u64>
339 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a u64>
340 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<u64, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
341 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a u64, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
342 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<u64>
343 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a u64>
344 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<i128, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
345 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a i128, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
346 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<i128>
347 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a i128>
348 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<i128, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
349 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a i128, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
350 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<i128>
351 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a i128>
352 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<u128, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
353 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a u128, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
354 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<u128>
355 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a u128>
356 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<u128, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
357 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a u128, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
358 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<u128>
359 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a u128>
360 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<isize, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
361 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a isize, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
362 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<isize>
363 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a isize>
364 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<isize, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
365 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a isize, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
366 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<isize>
367 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a isize>
368 + Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<usize, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
369 + for<'a> Shlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#<&'a usize, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shl#Output# = Self>
370 + ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<usize>
371 + for<'a> ShlAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShlAssign#<&'a usize>
372 + Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<usize, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
373 + for<'a> Shrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#<&'a usize, Outputrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/Shr#Output# = Self>
374 + ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<usize>
375 + for<'a> ShrAssignrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/ShrAssign#<&'a usize>
376 {
377 /// The type’s zero value.
378 const ZEROrust-analyzer cargo funty 2.0.0 Integral#ZERO.: Self;
379
380 /// The type’s step value.
381 const ONErust-analyzer cargo funty 2.0.0 Integral#ONE.: Self;
382
383 /// The type’s minimum value. This is zero for unsigned integers.
384 const MINrust-analyzer cargo funty 2.0.0 Integral#MIN.: Self;
385
386 /// The type’s maximum value.
387 const MAXrust-analyzer cargo funty 2.0.0 Integral#MAX.: Self;
388
389 /// The size of this type in bits.
390 const BITSrust-analyzer cargo funty 2.0.0 Integral#BITS.: u32;
391
392 /// Returns the smallest value that can be represented by this integer type.
393 fn min_valuerust-analyzer cargo funty 2.0.0 Integral#min_value().() -> Self;
394
395 /// Returns the largest value that can be represented by this integer type.
396 fn max_valuerust-analyzer cargo funty 2.0.0 Integral#max_value().() -> Self;
397
398 /// Converts a string slice in a given base to an integer.
399 ///
400 /// The string is expected to be an optional `+` or `-` sign followed by
401 /// digits. Leading and trailing whitespace represent an error. Digits are a
402 /// subset of these characters, depending on `radix`:
403 ///
404 /// - `0-9`
405 /// - `a-z`
406 /// - `A-Z`
407 ///
408 /// # Panics
409 ///
410 /// This function panics if `radix` is not in the range from 2 to 36.
411 fn from_str_radixrust-analyzer cargo funty 2.0.0 Integral#from_str_radix().(src: &str, radix: u32) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Self, ParseIntErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/error/ParseIntError#>;
412
413 /// Returns the number of ones in the binary representation of `self`.
414 fn count_onesrust-analyzer cargo funty 2.0.0 Integral#count_ones().(self) -> u32;
415
416 /// Returns the number of zeros in the binary representation of `self`.
417 fn count_zerosrust-analyzer cargo funty 2.0.0 Integral#count_zeros().(self) -> u32;
418
419 /// Returns the number of leading zeros in the binary representation of
420 /// `self`.
421 fn leading_zerosrust-analyzer cargo funty 2.0.0 Integral#leading_zeros().(self) -> u32;
422
423 /// Returns the number of trailing zeros in the binary representation of
424 /// `self`.
425 fn trailing_zerosrust-analyzer cargo funty 2.0.0 Integral#trailing_zeros().(self) -> u32;
426
427 /// Returns the number of leading ones in the binary representation of
428 /// `self`.
429 fn leading_onesrust-analyzer cargo funty 2.0.0 Integral#leading_ones().(self) -> u32;
430
431 /// Returns the number of trailing ones in the binary representation of
432 /// `self`.
433 fn trailing_onesrust-analyzer cargo funty 2.0.0 Integral#trailing_ones().(self) -> u32;
434
435 /// Shifts the bits to the left by a specified amount, `n`, wrapping the
436 /// truncated bits to the end of the resulting integer.
437 ///
438 /// Please note this isn’t the same operation as the `<<` shifting operator!
439 fn rotate_leftrust-analyzer cargo funty 2.0.0 Integral#rotate_left().(self, n: u32) -> Self;
440
441 /// Shifts the bits to the right by a specified amount, `n`, wrapping the
442 /// truncated bits to the beginning of the resulting integer.
443 ///
444 /// Please note this isn’t the same operation as the `>>` shifting operator!
445 fn rotate_rightrust-analyzer cargo funty 2.0.0 Integral#rotate_right().(self, n: u32) -> Self;
446
447 /// Reverses the byte order of the integer.
448 fn swap_bytesrust-analyzer cargo funty 2.0.0 Integral#swap_bytes().(self) -> Self;
449
450 /// Reverses the bit pattern of the integer.
451 fn reverse_bitsrust-analyzer cargo funty 2.0.0 Integral#reverse_bits().(self) -> Self;
452
453 /// Converts an integer from big endian to the target’s endianness.
454 ///
455 /// On big endian this is a no-op. On little endian the bytes are swapped.
456 #[allow(clippy::wrong_self_convention)]
457 fn from_berust-analyzer cargo funty 2.0.0 Integral#from_be().(self) -> Self;
458
459 /// Converts an integer frm little endian to the target’s endianness.
460 ///
461 /// On little endian this is a no-op. On big endian the bytes are swapped.
462 #[allow(clippy::wrong_self_convention)]
463 fn from_lerust-analyzer cargo funty 2.0.0 Integral#from_le().(self) -> Self;
464
465 /// Converts `self` to big endian from the target’s endianness.
466 ///
467 /// On big endian this is a no-op. On little endian the bytes are swapped.
468 fn to_berust-analyzer cargo funty 2.0.0 Integral#to_be().(self) -> Self;
469
470 /// Converts `self` to little endian from the target’s endianness.
471 ///
472 /// On little endian this is a no-op. On big endian the bytes are swapped.
473 fn to_lerust-analyzer cargo funty 2.0.0 Integral#to_le().(self) -> Self;
474
475 /// Checked integer addition. Computes `self + rhs`, returning `None` if
476 /// overflow occurred.
477 fn checked_addrust-analyzer cargo funty 2.0.0 Integral#checked_add().(self, rhs: Self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
478
479 /// Checked integer subtraction. Computes `self - rhs`, returning `None` if
480 /// overflow occurred.
481 fn checked_subrust-analyzer cargo funty 2.0.0 Integral#checked_sub().(self, rhs: Self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
482
483 /// Checked integer multiplication. Computes `self * rhs`, returning `None`
484 /// if overflow occurred.
485 fn checked_mulrust-analyzer cargo funty 2.0.0 Integral#checked_mul().(self, rhs: Self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
486
487 /// Checked integer division. Computes `self / rhs`, returning `None` if
488 /// `rhs == 0` or the division results in overflow.
489 fn checked_divrust-analyzer cargo funty 2.0.0 Integral#checked_div().(self, rhs: Self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
490
491 /// Checked Euclidean division. Computes `self.div_euclid(rhs)`, returning
492 /// `None` if `rhs == 0` or the division results in overflow.
493 fn checked_div_euclidrust-analyzer cargo funty 2.0.0 Integral#checked_div_euclid().(self, rhs: Self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
494
495 /// Checked integer remainder. Computes `self % rhs`, returning `None` if
496 /// `rhs == 0` or the division results in overflow.
497 fn checked_remrust-analyzer cargo funty 2.0.0 Integral#checked_rem().(self, rhs: Self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
498
499 /// Checked Euclidean remainder. Computes `self.rem_euclid(rhs)`, returning
500 /// `None` if `rhs == 0` or the division results in overflow.
501 fn checked_rem_euclidrust-analyzer cargo funty 2.0.0 Integral#checked_rem_euclid().(self, rhs: Self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
502
503 /// Checked negation. Computes `-self`, returning `None` if `self == MIN`.
504 ///
505 /// Note that negating any positive integer will overflow.
506 fn checked_negrust-analyzer cargo funty 2.0.0 Integral#checked_neg().(self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
507
508 /// Checked shift left. Computes `self << rhs`, returning `None` if `rhs` is
509 /// larger than or equal to the number of bits in `self`.
510 fn checked_shlrust-analyzer cargo funty 2.0.0 Integral#checked_shl().(self, rhs: u32) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
511
512 /// Checked shift right. Computes `self >> rhs`, returning `None` if `rhs`
513 /// is larger than or equal to the number of bits in `self`.
514 fn checked_shrrust-analyzer cargo funty 2.0.0 Integral#checked_shr().(self, rhs: u32) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
515
516 /// Checked exponentiation. Computes `self.pow(exp)`, returning `None` if
517 /// overflow occurred.
518 fn checked_powrust-analyzer cargo funty 2.0.0 Integral#checked_pow().(self, rhs: u32) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
519
520 /// Saturating integer addition. Computes `self + rhs`, saturating at the
521 /// numeric bounds instead of overflowing.
522 fn saturating_addrust-analyzer cargo funty 2.0.0 Integral#saturating_add().(self, rhs: Self) -> Self;
523
524 /// Saturating integer subtraction. Computes `self - rhs`, saturating at the
525 /// numeric bounds instead of overflowing.
526 fn saturating_subrust-analyzer cargo funty 2.0.0 Integral#saturating_sub().(self, rhs: Self) -> Self;
527
528 /// Saturating integer multiplication. Computes `self * rhs`, saturating at
529 /// the numeric bounds instead of overflowing.
530 fn saturating_mulrust-analyzer cargo funty 2.0.0 Integral#saturating_mul().(self, rhs: Self) -> Self;
531
532 /// Saturating integer exponentiation. Computes `self.pow(exp)`, saturating
533 /// at the numeric bounds instead of overflowing.
534 fn saturating_powrust-analyzer cargo funty 2.0.0 Integral#saturating_pow().(self, rhs: u32) -> Self;
535
536 /// Wrapping (modular) addition. Computes `self + rhs`, wrapping around at
537 /// the boundary of the type.
538 fn wrapping_addrust-analyzer cargo funty 2.0.0 Integral#wrapping_add().(self, rhs: Self) -> Self;
539
540 /// Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around
541 /// at the boundary of the type.
542 fn wrapping_subrust-analyzer cargo funty 2.0.0 Integral#wrapping_sub().(self, rhs: Self) -> Self;
543
544 /// Wrapping (modular) multiplication. Computes `self * rhs`, wrapping
545 /// around at the boundary of the type.
546 fn wrapping_mulrust-analyzer cargo funty 2.0.0 Integral#wrapping_mul().(self, rhs: Self) -> Self;
547
548 /// Wrapping (modular) division. Computes `self / rhs`, wrapping around at
549 /// the boundary of the type.
550 ///
551 /// # Signed Integers
552 ///
553 /// The only case where such wrapping can occur is when one divides
554 /// `MIN / -1` on a signed type (where `MIN` is the negative minimal value
555 /// for the type); this is equivalent to `-MIN`, a positive value that is
556 /// too large to represent in the type. In such a case, this function
557 /// returns `MIN` itself.
558 ///
559 /// # Unsigned Integers
560 ///
561 /// Wrapping (modular) division. Computes `self / rhs`. Wrapped division on
562 /// unsigned types is just normal division. There’s no way wrapping could
563 /// ever happen. This function exists, so that all operations are accounted
564 /// for in the wrapping operations.
565 ///
566 /// # Panics
567 ///
568 /// This function will panic if `rhs` is 0.
569 fn wrapping_divrust-analyzer cargo funty 2.0.0 Integral#wrapping_div().(self, rhs: Self) -> Self;
570
571 /// Wrapping Euclidean division. Computes `self.div_euclid(rhs)`, wrapping
572 /// around at the boundary of the type.
573 ///
574 /// # Signed Types
575 ///
576 /// Wrapping will only occur in `MIN / -1` on a signed type (where `MIN` is
577 /// the negative minimal value for the type). This is equivalent to `-MIN`,
578 /// a positive value that is too large to represent in the type. In this
579 /// case, this method returns `MIN` itself.
580 ///
581 /// # Unsigned Types
582 ///
583 /// Wrapped division on unsigned types is just normal division. There’s no
584 /// way wrapping could ever happen. This function exists, so that all
585 /// operations are accounted for in the wrapping operations. Since, for the
586 /// positive integers, all common definitions of division are equal, this is
587 /// exactly equal to `self.wrapping_div(rhs)`.
588 ///
589 /// # Panics
590 ///
591 /// This function will panic if `rhs` is 0.
592 fn wrapping_div_euclidrust-analyzer cargo funty 2.0.0 Integral#wrapping_div_euclid().(self, rhs: Self) -> Self;
593
594 /// Wrapping (modular) remainder. Computes `self % rhs`, wrapping around at
595 /// the boundary of the type.
596 ///
597 /// # Signed Integers
598 ///
599 /// Such wrap-around never actually occurs mathematically; implementation
600 /// artifacts make `x % y` invalid for `MIN / -1` on a signed type (where
601 /// `MIN` is the negative minimal value). In such a case, this function
602 /// returns `0`.
603 ///
604 /// # Unsigned Integers
605 ///
606 /// Wrapped remainder calculation on unsigned types is just the regular
607 /// remainder calculation. There’s no way wrapping could ever happen. This
608 /// function exists, so that all operations are accounted for in the
609 /// wrapping operations.
610 ///
611 /// # Panics
612 ///
613 /// This function will panic if `rhs` is 0.
614 fn wrapping_remrust-analyzer cargo funty 2.0.0 Integral#wrapping_rem().(self, rhs: Self) -> Self;
615
616 /// Wrapping Euclidean remainder. Computes `self.rem_euclid(rhs)`, wrapping
617 /// around at the boundary of the type.
618 ///
619 /// # Signed Integers
620 ///
621 /// Wrapping will only occur in `MIN % -1` on a signed type (where `MIN` is
622 /// the negative minimal value for the type). In this case, this method
623 /// returns 0.
624 ///
625 /// # Unsigned Integers
626 ///
627 /// Wrapped modulo calculation on unsigned types is just the regular
628 /// remainder calculation. There’s no way wrapping could ever happen. This
629 /// function exists, so that all operations are accounted for in the
630 /// wrapping operations. Since, for the positive integers, all common
631 /// definitions of division are equal, this is exactly equal to
632 /// `self.wrapping_rem(rhs)`.
633 ///
634 /// # Panics
635 ///
636 /// This function will panic if `rhs` is 0.
637 fn wrapping_rem_euclidrust-analyzer cargo funty 2.0.0 Integral#wrapping_rem_euclid().(self, rhs: Self) -> Self;
638
639 /// Wrapping (modular) negation. Computes `-self`, wrapping around at the
640 /// boundary of the type.
641 ///
642 /// # Signed Integers
643 ///
644 /// The only case where such wrapping can occur is when one negates `MIN`
645 /// on a signed type (where `MIN` is the negative minimal value for the
646 /// type); this is a positive value that is too large to represent in the
647 /// type. In such a case, this function returns `MIN` itself.
648 ///
649 /// # Unsigned Integers
650 ///
651 /// Since unsigned types do not have negative equivalents all applications
652 /// of this function will wrap (except for `-0`). For values smaller than
653 /// the corresponding signed type’s maximum the result is the same as
654 /// casting the corresponding signed value. Any larger values are equivalent
655 /// to `MAX + 1 - (val - MAX - 1)` where `MAX` is the corresponding signed
656 /// type’s maximum.
657 fn wrapping_negrust-analyzer cargo funty 2.0.0 Integral#wrapping_neg().(self) -> Self;
658
659 /// Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask`
660 /// removes any high-order bits of `rhs` that would cause the shift to
661 /// exceed the bit-width of the type.
662 ///
663 /// Note that this is not the same as a rotate-left; the RHS of a wrapping
664 /// shift-left is restricted to the range of the type, rather than the bits
665 /// shifted out of the LHS being returned to the other end. The primitive
666 /// integer types all implement a `rotate_left` function, which may be what
667 /// you want instead.
668 fn wrapping_shlrust-analyzer cargo funty 2.0.0 Integral#wrapping_shl().(self, rhs: u32) -> Self;
669
670 /// Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask`
671 /// removes any high-order bits of `rhs` that would cause the shift to
672 /// exceed the bit-width of the type.
673 ///
674 /// Note that this is not the same as a rotate-right; the RHS of a wrapping
675 /// shift-right is restricted to the range of the type, rather than the bits
676 /// shifted out of the LHS being returned to the other end. The primitive
677 /// integer types all implement a `rotate_right` function, which may be what
678 /// you want instead.
679 fn wrapping_shrrust-analyzer cargo funty 2.0.0 Integral#wrapping_shr().(self, rhs: u32) -> Self;
680
681 /// Wrapping (modular) exponentiation. Computes `self.pow(exp)`, wrapping
682 /// around at the boundary of the type.
683 fn wrapping_powrust-analyzer cargo funty 2.0.0 Integral#wrapping_pow().(self, rhs: u32) -> Self;
684
685 /// Calculates `self + rhs`
686 ///
687 /// Returns a tuple of the addition along with a boolean indicating whether
688 /// an arithmetic overflow would occur. If an overflow would have occurred
689 /// then the wrapped value is returned.
690 fn overflowing_addrust-analyzer cargo funty 2.0.0 Integral#overflowing_add().(self, rhs: Self) -> (Self, bool);
691
692 /// Calculates `self - rhs`
693 ///
694 /// Returns a tuple of the subtraction along with a boolean indicating
695 /// whether an arithmetic overflow would occur. If an overflow would have
696 /// occurred then the wrapped value is returned.
697 fn overflowing_subrust-analyzer cargo funty 2.0.0 Integral#overflowing_sub().(self, rhs: Self) -> (Self, bool);
698
699 /// Calculates the multiplication of `self` and `rhs`.
700 ///
701 /// Returns a tuple of the multiplication along with a boolean indicating
702 /// whether an arithmetic overflow would occur. If an overflow would have
703 /// occurred then the wrapped value is returned.
704 fn overflowing_mulrust-analyzer cargo funty 2.0.0 Integral#overflowing_mul().(self, rhs: Self) -> (Self, bool);
705
706 /// Calculates the divisor when `self` is divided by `rhs`.
707 ///
708 /// Returns a tuple of the divisor along with a boolean indicating whether
709 /// an arithmetic overflow would occur. If an overflow would occur then self
710 /// is returned.
711 ///
712 /// # Panics
713 ///
714 /// This function will panic if `rhs` is 0.
715 fn overflowing_divrust-analyzer cargo funty 2.0.0 Integral#overflowing_div().(self, rhs: Self) -> (Self, bool);
716
717 /// Calculates the quotient of Euclidean division `self.div_euclid(rhs)`.
718 ///
719 /// Returns a tuple of the divisor along with a boolean indicating whether
720 /// an arithmetic overflow would occur. If an overflow would occur then self
721 /// is returned.
722 ///
723 /// # Panics
724 ///
725 /// This function will panic if `rhs` is 0.
726 fn overflowing_div_euclidrust-analyzer cargo funty 2.0.0 Integral#overflowing_div_euclid().(self, rhs: Self) -> (Self, bool);
727
728 /// Calculates the remainder when `self` is divided by `rhs`.
729 ///
730 /// Returns a tuple of the remainder after dividing along with a boolean
731 /// indicating whether an arithmetic overflow would occur. If an overflow
732 /// would occur then 0 is returned.
733 ///
734 /// # Panics
735 ///
736 /// This function will panic if `rhs` is 0.
737 fn overflowing_remrust-analyzer cargo funty 2.0.0 Integral#overflowing_rem().(self, rhs: Self) -> (Self, bool);
738
739 /// Overflowing Euclidean remainder. Calculates `self.rem_euclid(rhs)`.
740 ///
741 /// Returns a tuple of the remainder after dividing along with a boolean
742 /// indicating whether an arithmetic overflow would occur. If an overflow
743 /// would occur then 0 is returned.
744 ///
745 /// # Panics
746 ///
747 /// This function will panic if rhs is 0.
748 fn overflowing_rem_euclidrust-analyzer cargo funty 2.0.0 Integral#overflowing_rem_euclid().(self, rhs: Self) -> (Self, bool);
749
750 /// Negates self, overflowing if this is equal to the minimum value.
751 ///
752 /// Returns a tuple of the negated version of self along with a boolean
753 /// indicating whether an overflow happened. If `self` is the minimum value
754 /// (e.g., `i32::MIN` for values of type `i32`), then the minimum value will
755 /// be returned again and `true` will be returned for an overflow happening.
756 fn overflowing_negrust-analyzer cargo funty 2.0.0 Integral#overflowing_neg().(self) -> (Self, bool);
757
758 /// Shifts self left by `rhs` bits.
759 ///
760 /// Returns a tuple of the shifted version of self along with a boolean
761 /// indicating whether the shift value was larger than or equal to the
762 /// number of bits. If the shift value is too large, then value is masked
763 /// (N-1) where N is the number of bits, and this value is then used to
764 /// perform the shift.
765 fn overflowing_shlrust-analyzer cargo funty 2.0.0 Integral#overflowing_shl().(self, rhs: u32) -> (Self, bool);
766
767 /// Shifts self right by `rhs` bits.
768 ///
769 /// Returns a tuple of the shifted version of self along with a boolean
770 /// indicating whether the shift value was larger than or equal to the
771 /// number of bits. If the shift value is too large, then value is masked
772 /// (N-1) where N is the number of bits, and this value is then used to
773 /// perform the shift.
774 fn overflowing_shrrust-analyzer cargo funty 2.0.0 Integral#overflowing_shr().(self, rhs: u32) -> (Self, bool);
775
776 /// Raises self to the power of `exp`, using exponentiation by squaring.
777 ///
778 /// Returns a tuple of the exponentiation along with a bool indicating
779 /// whether an overflow happened.
780 fn overflowing_powrust-analyzer cargo funty 2.0.0 Integral#overflowing_pow().(self, rhs: u32) -> (Self, bool);
781
782 /// Raises self to the power of `exp`, using exponentiation by squaring.
783 fn powrust-analyzer cargo funty 2.0.0 Integral#pow().(self, rhs: u32) -> Self;
784
785 /// Calculates the quotient of Euclidean division of self by rhs.
786 ///
787 /// This computes the integer `n` such that
788 /// `self = n * rhs + self.rem_euclid(rhs)`, with
789 /// `0 <= self.rem_euclid(rhs) < rhs`.
790 ///
791 /// In other words, the result is `self / rhs` rounded to the integer `n`
792 /// such that `self >= n * rhs`. If `self > 0`, this is equal to round
793 /// towards zero (the default in Rust); if `self < 0`, this is equal to
794 /// round towards +/- infinity.
795 ///
796 /// # Panics
797 ///
798 /// This function will panic if `rhs` is 0 or the division results in
799 /// overflow.
800 fn div_euclidrust-analyzer cargo funty 2.0.0 Integral#div_euclid().(self, rhs: Self) -> Self;
801
802 /// Calculates the least nonnegative remainder of `self (mod rhs)`.
803 ///
804 /// This is done as if by the Euclidean division algorithm -- given
805 /// `r = self.rem_euclid(rhs)`, `self = rhs * self.div_euclid(rhs) + r`, and
806 /// `0 <= r < abs(rhs)`.
807 ///
808 /// # Panics
809 ///
810 /// This function will panic if `rhs` is 0 or the division results in
811 /// overflow.
812 fn rem_euclidrust-analyzer cargo funty 2.0.0 Integral#rem_euclid().(self, rhs: Self) -> Self;
813 }
814
815 /// Declare that a type is a signed integer.
816 pub trait Signedrust-analyzer cargo funty 2.0.0 Signed#: Integralrust-analyzer cargo funty 2.0.0 Integral# + Negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg# {
817 /// Checked absolute value. Computes `self.abs()`, returning `None` if
818 /// `self == MIN`.
819 fn checked_absrust-analyzer cargo funty 2.0.0 Signed#checked_abs().(self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
820
821 /// Wrapping (modular) absolute value. Computes `self.abs()`, wrapping
822 /// around at the boundary of the type.
823 ///
824 /// The only case where such wrapping can occur is when one takes the
825 /// absolute value of the negative minimal value for the type this is a
826 /// positive value that is too large to represent in the type. In such a
827 /// case, this function returns `MIN` itself.
828 fn wrapping_absrust-analyzer cargo funty 2.0.0 Signed#wrapping_abs().(self) -> Self;
829
830 /// Computes the absolute value of `self`.
831 ///
832 /// Returns a tuple of the absolute version of self along with a boolean
833 /// indicating whether an overflow happened. If self is the minimum value
834 /// (e.g., iN::MIN for values of type iN), then the minimum value will be
835 /// returned again and true will be returned for an overflow happening.
836 fn overflowing_absrust-analyzer cargo funty 2.0.0 Signed#overflowing_abs().(self) -> (Self, bool);
837
838 //// Computes the absolute value of self.
839 ///
840 /// # Overflow behavior
841 ///
842 /// The absolute value of `iN::min_value()` cannot be represented as an
843 /// `iN`, and attempting to calculate it will cause an overflow. This means
844 /// that code in debug mode will trigger a panic on this case and optimized
845 /// code will return `iN::min_value()` without a panic.
846 fn absrust-analyzer cargo funty 2.0.0 Signed#abs().(self) -> Self;
847
848 /// Returns a number representing sign of `self`.
849 ///
850 /// - `0` if the number is zero
851 /// - `1` if the number is positive
852 /// - `-1` if the number is negative
853 fn signumrust-analyzer cargo funty 2.0.0 Signed#signum().(self) -> Self;
854
855 /// Returns `true` if `self` is positive and `false` if the number is zero
856 /// or negative.
857 fn is_positiverust-analyzer cargo funty 2.0.0 Signed#is_positive().(self) -> bool;
858
859 /// Returns `true` if `self` is negative and `false` if the number is zero
860 /// or positive.
861 fn is_negativerust-analyzer cargo funty 2.0.0 Signed#is_negative().(self) -> bool;
862 }
863
864 /// Declare that a type is an unsigned integer.
865 pub trait Unsignedrust-analyzer cargo funty 2.0.0 Unsigned#: Integralrust-analyzer cargo funty 2.0.0 Integral# {
866 /// Returns `true` if and only if `self == 2^k` for some `k`.
867 fn is_power_of_tworust-analyzer cargo funty 2.0.0 Unsigned#is_power_of_two().(self) -> bool;
868
869 /// Returns the smallest power of two greater than or equal to `self`.
870 ///
871 /// When return value overflows (i.e., `self > (1 << (N-1))` for type `uN`),
872 /// it panics in debug mode and return value is wrapped to 0 in release mode
873 /// (the only situation in which method can return 0).
874 fn next_power_of_tworust-analyzer cargo funty 2.0.0 Unsigned#next_power_of_two().(self) -> Self;
875
876 /// Returns the smallest power of two greater than or equal to `n`. If the
877 /// next power of two is greater than the type’s maximum value, `None` is
878 /// returned, otherwise the power of two is wrapped in `Some`.
879 fn checked_next_power_of_tworust-analyzer cargo funty 2.0.0 Unsigned#checked_next_power_of_two().(self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Self>;
880 }
881
882 /// Declare that a type is a floating-point number.
883 pub trait Floatingrust-analyzer cargo funty 2.0.0 Floating#:
884 Numericrust-analyzer cargo funty 2.0.0 Numeric#
885 + LowerExprust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/LowerExp#
886 + UpperExprust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/UpperExp#
887 + Negrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/Neg#
888 + Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<f32>
889 + Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<i8>
890 + Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<i16>
891 + Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<u8>
892 + Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<u16>
893 {
894 /// The unsigned integer type of the same width as `Self`.
895 type Rawrust-analyzer cargo funty 2.0.0 Floating#Raw#: Unsignedrust-analyzer cargo funty 2.0.0 Unsigned#;
896
897 /// The radix or base of the internal representation of `f32`.
898 const RADIXrust-analyzer cargo funty 2.0.0 Floating#RADIX.: u32;
899
900 /// Number of significant digits in base 2.
901 const MANTISSA_DIGITSrust-analyzer cargo funty 2.0.0 Floating#MANTISSA_DIGITS.: u32;
902
903 /// Approximate number of significant digits in base 10.
904 const DIGITSrust-analyzer cargo funty 2.0.0 Floating#DIGITS.: u32;
905
906 /// [Machine epsilon] value for `f32`.
907 ///
908 /// This is the difference between `1.0` and the next larger representable
909 /// number.
910 ///
911 /// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon
912 const EPSILONrust-analyzer cargo funty 2.0.0 Floating#EPSILON.: Self;
913
914 /// Smallest finite `f32` value.
915 const MINrust-analyzer cargo funty 2.0.0 Floating#MIN.: Self;
916
917 /// Smallest positive normal `f32` value.
918 const MIN_POSITIVErust-analyzer cargo funty 2.0.0 Floating#MIN_POSITIVE.: Self;
919
920 /// Largest finite `f32` value.
921 const MAXrust-analyzer cargo funty 2.0.0 Floating#MAX.: Self;
922
923 /// One greater than the minimum possible normal power of 2 exponent.
924 const MIN_EXPrust-analyzer cargo funty 2.0.0 Floating#MIN_EXP.: i32;
925
926 /// Maximum possible power of 2 exponent.
927 const MAX_EXPrust-analyzer cargo funty 2.0.0 Floating#MAX_EXP.: i32;
928
929 /// Minimum possible normal power of 10 exponent.
930 const MIN_10_EXPrust-analyzer cargo funty 2.0.0 Floating#MIN_10_EXP.: i32;
931
932 /// Maximum possible power of 10 exponent.
933 const MAX_10_EXPrust-analyzer cargo funty 2.0.0 Floating#MAX_10_EXP.: i32;
934
935 /// Not a Number (NaN).
936 const NANrust-analyzer cargo funty 2.0.0 Floating#NAN.: Self;
937
938 /// Infinity (∞).
939 const INFINITYrust-analyzer cargo funty 2.0.0 Floating#INFINITY.: Self;
940
941 /// Negative infinity (−∞).
942 const NEG_INFINITYrust-analyzer cargo funty 2.0.0 Floating#NEG_INFINITY.: Self;
943
944 /// Archimedes' constant (Ï€)
945 const PIrust-analyzer cargo funty 2.0.0 Floating#PI.: Self;
946
947 /// π/2
948 const FRAC_PI_2rust-analyzer cargo funty 2.0.0 Floating#FRAC_PI_2.: Self;
949
950 /// π/3
951 const FRAC_PI_3rust-analyzer cargo funty 2.0.0 Floating#FRAC_PI_3.: Self;
952
953 /// π/4
954 const FRAC_PI_4rust-analyzer cargo funty 2.0.0 Floating#FRAC_PI_4.: Self;
955
956 /// π/6
957 const FRAC_PI_6rust-analyzer cargo funty 2.0.0 Floating#FRAC_PI_6.: Self;
958
959 /// π/8
960 const FRAC_PI_8rust-analyzer cargo funty 2.0.0 Floating#FRAC_PI_8.: Self;
961
962 /// 1/Ï€
963 const FRAC_1_PIrust-analyzer cargo funty 2.0.0 Floating#FRAC_1_PI.: Self;
964
965 /// 2/Ï€
966 const FRAC_2_PIrust-analyzer cargo funty 2.0.0 Floating#FRAC_2_PI.: Self;
967
968 /// 2/sqrt(Ï€)
969 const FRAC_2_SQRT_PIrust-analyzer cargo funty 2.0.0 Floating#FRAC_2_SQRT_PI.: Self;
970
971 /// sqrt(2)
972 const SQRT_2rust-analyzer cargo funty 2.0.0 Floating#SQRT_2.: Self;
973
974 /// 1/sqrt(2)
975 const FRAC_1_SQRT_2rust-analyzer cargo funty 2.0.0 Floating#FRAC_1_SQRT_2.: Self;
976
977 /// Euler’s number (e)
978 const Erust-analyzer cargo funty 2.0.0 Floating#E.: Self;
979
980 /// log<sub>2</sub>(e)
981 const LOG2_Erust-analyzer cargo funty 2.0.0 Floating#LOG2_E.: Self;
982
983 /// log<sub>10</sub>(e)
984 const LOG10_Erust-analyzer cargo funty 2.0.0 Floating#LOG10_E.: Self;
985
986 /// ln(2)
987 const LN_2rust-analyzer cargo funty 2.0.0 Floating#LN_2.: Self;
988
989 /// ln(10)
990 const LN_10rust-analyzer cargo funty 2.0.0 Floating#LN_10.: Self;
991
992 // These functions are only available in `std`, because they rely on the
993 // system math library `libm` which is not provided by `core`.
994
995 /// Returns the largest integer less than or equal to a number.
996 #[cfg(feature = "std")]
997 fn floorrust-analyzer cargo funty 2.0.0 Floating#floor().(self) -> Self;
998
999 /// Returns the smallest integer greater than or equal to a number.
1000 #[cfg(feature = "std")]
1001 fn ceilrust-analyzer cargo funty 2.0.0 Floating#ceil().(self) -> Self;
1002
1003 /// Returns the nearest integer to a number. Round half-way cases away from
1004 /// `0.0`.
1005 #[cfg(feature = "std")]
1006 fn roundrust-analyzer cargo funty 2.0.0 Floating#round().(self) -> Self;
1007
1008 /// Returns the integer part of a number.
1009 #[cfg(feature = "std")]
1010 fn truncrust-analyzer cargo funty 2.0.0 Floating#trunc().(self) -> Self;
1011
1012 /// Returns the fractional part of a number.
1013 #[cfg(feature = "std")]
1014 fn fractrust-analyzer cargo funty 2.0.0 Floating#fract().(self) -> Self;
1015
1016 /// Computes the absolute value of `self`. Returns `NAN` if the
1017 /// number is `NAN`.
1018 #[cfg(feature = "std")]
1019 fn absrust-analyzer cargo funty 2.0.0 Floating#abs().(self) -> Self;
1020
1021 /// Returns a number that represents the sign of `self`.
1022 ///
1023 /// - `1.0` if the number is positive, `+0.0` or `INFINITY`
1024 /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`
1025 /// - `NAN` if the number is `NAN`
1026 #[cfg(feature = "std")]
1027 fn signumrust-analyzer cargo funty 2.0.0 Floating#signum().(self) -> Self;
1028
1029 /// Returns a number composed of the magnitude of `self` and the sign of
1030 /// `sign`.
1031 ///
1032 /// Equal to `self` if the sign of `self` and `sign` are the same, otherwise
1033 /// equal to `-self`. If `self` is a `NAN`, then a `NAN` with the sign of
1034 /// `sign` is returned.
1035 #[cfg(feature = "std")]
1036 fn copysignrust-analyzer cargo funty 2.0.0 Floating#copysign().(self, sign: Self) -> Self;
1037
1038 /// Fused multiply-add. Computes `(self * a) + b` with only one rounding
1039 /// error, yielding a more accurate result than an un-fused multiply-add.
1040 ///
1041 /// Using `mul_add` can be more performant than an un-fused multiply-add if
1042 /// the target architecture has a dedicated `fma` CPU instruction.
1043 #[cfg(feature = "std")]
1044 fn mul_addrust-analyzer cargo funty 2.0.0 Floating#mul_add().(self, a: Self, b: Self) -> Self;
1045
1046 /// Calculates Euclidean division, the matching method for `rem_euclid`.
1047 ///
1048 /// This computes the integer `n` such that
1049 /// `self = n * rhs + self.rem_euclid(rhs)`.
1050 /// In other words, the result is `self / rhs` rounded to the integer `n`
1051 /// such that `self >= n * rhs`.
1052 #[cfg(feature = "std")]
1053 fn div_euclidrust-analyzer cargo funty 2.0.0 Floating#div_euclid().(self, rhs: Self) -> Self;
1054
1055 /// Calculates the least nonnegative remainder of `self (mod rhs)`.
1056 ///
1057 /// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
1058 /// most cases. However, due to a floating point round-off error it can
1059 /// result in `r == rhs.abs()`, violating the mathematical definition, if
1060 /// `self` is much smaller than `rhs.abs()` in magnitude and `self < 0.0`.
1061 /// This result is not an element of the function's codomain, but it is the
1062 /// closest floating point number in the real numbers and thus fulfills the
1063 /// property `self == self.div_euclid(rhs) * rhs + self.rem_euclid(rhs)`
1064 /// approximatively.
1065 #[cfg(feature = "std")]
1066 fn rem_euclidrust-analyzer cargo funty 2.0.0 Floating#rem_euclid().(self, rhs: Self) -> Self;
1067
1068 /// Raises a number to an integer power.
1069 ///
1070 /// Using this function is generally faster than using `powf`
1071 #[cfg(feature = "std")]
1072 fn powirust-analyzer cargo funty 2.0.0 Floating#powi().(self, n: i32) -> Self;
1073
1074 /// Raises a number to a floating point power.
1075 #[cfg(feature = "std")]
1076 fn powfrust-analyzer cargo funty 2.0.0 Floating#powf().(self, n: Self) -> Self;
1077
1078 /// Returns the square root of a number.
1079 ///
1080 /// Returns NaN if `self` is a negative number.
1081 #[cfg(feature = "std")]
1082 fn sqrtrust-analyzer cargo funty 2.0.0 Floating#sqrt().(self) -> Self;
1083
1084 /// Returns `e^(self)`, (the exponential function).
1085 #[cfg(feature = "std")]
1086 fn exprust-analyzer cargo funty 2.0.0 Floating#exp().(self) -> Self;
1087
1088 /// Returns `2^(self)`.
1089 #[cfg(feature = "std")]
1090 fn exp2rust-analyzer cargo funty 2.0.0 Floating#exp2().(self) -> Self;
1091
1092 /// Returns the natural logarithm of the number.
1093 #[cfg(feature = "std")]
1094 fn lnrust-analyzer cargo funty 2.0.0 Floating#ln().(self) -> Self;
1095
1096 /// Returns the logarithm of the number with respect to an arbitrary base.
1097 ///
1098 /// The result may not be correctly rounded owing to implementation details;
1099 /// `self.log2()` can produce more accurate results for base 2, and
1100 /// `self.log10()` can produce more accurate results for base 10.
1101 #[cfg(feature = "std")]
1102 fn logrust-analyzer cargo funty 2.0.0 Floating#log().(self, base: Self) -> Self;
1103
1104 /// Returns the base 2 logarithm of the number.
1105 #[cfg(feature = "std")]
1106 fn log2rust-analyzer cargo funty 2.0.0 Floating#log2().(self) -> Self;
1107
1108 /// Returns the base 10 logarithm of the number.
1109 #[cfg(feature = "std")]
1110 fn log10rust-analyzer cargo funty 2.0.0 Floating#log10().(self) -> Self;
1111
1112 /// Returns the cubic root of a number.
1113 #[cfg(feature = "std")]
1114 fn cbrtrust-analyzer cargo funty 2.0.0 Floating#cbrt().(self) -> Self;
1115
1116 /// Computes the sine of a number (in radians).
1117 #[cfg(feature = "std")]
1118 fn hypotrust-analyzer cargo funty 2.0.0 Floating#hypot().(self, other: Self) -> Self;
1119
1120 /// Computes the sine of a number (in radians).
1121 #[cfg(feature = "std")]
1122 fn sinrust-analyzer cargo funty 2.0.0 Floating#sin().(self) -> Self;
1123
1124 /// Computes the cosine of a number (in radians).
1125 #[cfg(feature = "std")]
1126 fn cosrust-analyzer cargo funty 2.0.0 Floating#cos().(self) -> Self;
1127
1128 /// Computes the tangent of a number (in radians).
1129 #[cfg(feature = "std")]
1130 fn tanrust-analyzer cargo funty 2.0.0 Floating#tan().(self) -> Self;
1131
1132 /// Computes the arcsine of a number. Return value is in radians in the
1133 /// range [-pi/2, pi/2] or NaN if the number is outside the range [-1, 1].
1134 #[cfg(feature = "std")]
1135 fn asinrust-analyzer cargo funty 2.0.0 Floating#asin().(self) -> Self;
1136
1137 /// Computes the arccosine of a number. Return value is in radians in the
1138 /// range [0, pi] or NaN if the number is outside the range [-1, 1].
1139 #[cfg(feature = "std")]
1140 fn acosrust-analyzer cargo funty 2.0.0 Floating#acos().(self) -> Self;
1141
1142 /// Computes the arctangent of a number. Return value is in radians in the
1143 /// range [-pi/2, pi/2];
1144 #[cfg(feature = "std")]
1145 fn atanrust-analyzer cargo funty 2.0.0 Floating#atan().(self) -> Self;
1146
1147 /// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`)
1148 /// in radians.
1149 ///
1150 /// - `x = 0`, `y = 0`: `0`
1151 /// - `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
1152 /// - `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
1153 /// - `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
1154 #[cfg(feature = "std")]
1155 fn atan2rust-analyzer cargo funty 2.0.0 Floating#atan2().(self, other: Self) -> Self;
1156
1157 /// Simultaneously computes the sine and cosine of the number, `x`. Returns
1158 /// `(sin(x), cos(x))`.
1159 #[cfg(feature = "std")]
1160 fn sin_cosrust-analyzer cargo funty 2.0.0 Floating#sin_cos().(self) -> (Self, Self);
1161
1162 /// Returns `e^(self) - 1` in a way that is accurate even if the number is
1163 /// close to zero.
1164 #[cfg(feature = "std")]
1165 fn exp_m1rust-analyzer cargo funty 2.0.0 Floating#exp_m1().(self) -> Self;
1166
1167 /// Returns `ln(1+n)` (natural logarithm) more accurately than if the
1168 /// operations were performed separately.
1169 #[cfg(feature = "std")]
1170 fn ln_1prust-analyzer cargo funty 2.0.0 Floating#ln_1p().(self) -> Self;
1171
1172 /// Hyperbolic sine function.
1173 #[cfg(feature = "std")]
1174 fn sinhrust-analyzer cargo funty 2.0.0 Floating#sinh().(self) -> Self;
1175
1176 /// Hyperbolic cosine function.
1177 #[cfg(feature = "std")]
1178 fn coshrust-analyzer cargo funty 2.0.0 Floating#cosh().(self) -> Self;
1179
1180 /// Hyperbolic tangent function.
1181 #[cfg(feature = "std")]
1182 fn tanhrust-analyzer cargo funty 2.0.0 Floating#tanh().(self) -> Self;
1183
1184 /// Inverse hyperbolic sine function.
1185 #[cfg(feature = "std")]
1186 fn asinhrust-analyzer cargo funty 2.0.0 Floating#asinh().(self) -> Self;
1187
1188 /// Inverse hyperbolic cosine function.
1189 #[cfg(feature = "std")]
1190 fn acoshrust-analyzer cargo funty 2.0.0 Floating#acosh().(self) -> Self;
1191
1192 /// Inverse hyperbolic tangent function.
1193 #[cfg(feature = "std")]
1194 fn atanhrust-analyzer cargo funty 2.0.0 Floating#atanh().(self) -> Self;
1195
1196 /// Returns `true` if this value is `NaN`.
1197 fn is_nanrust-analyzer cargo funty 2.0.0 Floating#is_nan().(self) -> bool;
1198
1199 /// Returns `true` if this value is positive infinity or negative infinity,
1200 /// and `false` otherwise.
1201 fn is_infiniterust-analyzer cargo funty 2.0.0 Floating#is_infinite().(self) -> bool;
1202
1203 /// Returns `true` if this number is neither infinite nor `NaN`.
1204 fn is_finiterust-analyzer cargo funty 2.0.0 Floating#is_finite().(self) -> bool;
1205
1206 /// Returns `true` if the number is neither zero, infinite, [subnormal], or
1207 /// `NaN`.
1208 ///
1209 /// [subnormal]: https://en.wixipedia.org/wiki/Denormal_number
1210 fn is_normalrust-analyzer cargo funty 2.0.0 Floating#is_normal().(self) -> bool;
1211
1212 /// Returns the floating point category of the number. If only one property
1213 /// is going to be tested, it is generally faster to use the specific
1214 /// predicate instead.
1215 fn classifyrust-analyzer cargo funty 2.0.0 Floating#classify().(self) -> FpCategoryrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/FpCategory#;
1216
1217 /// Returns `true` if `self` has a positive sign, including `+0.0`, `NaN`s
1218 /// with positive sign bit and positive infinity.
1219 fn is_sign_positiverust-analyzer cargo funty 2.0.0 Floating#is_sign_positive().(self) -> bool;
1220
1221 /// Returns `true` if `self` has a negative sign, including `-0.0`, `NaN`s
1222 /// with negative sign bit and negative infinity.
1223 fn is_sign_negativerust-analyzer cargo funty 2.0.0 Floating#is_sign_negative().(self) -> bool;
1224
1225 /// Takes the reciprocal (inverse) of a number, `1/x`.
1226 fn reciprust-analyzer cargo funty 2.0.0 Floating#recip().(self) -> Self;
1227
1228 /// Converts radians to degrees.
1229 fn to_degreesrust-analyzer cargo funty 2.0.0 Floating#to_degrees().(self) -> Self;
1230
1231 /// Converts degrees to radians.
1232 fn to_radiansrust-analyzer cargo funty 2.0.0 Floating#to_radians().(self) -> Self;
1233
1234 /// Returns the maximum of the two numbers.
1235 fn maxrust-analyzer cargo funty 2.0.0 Floating#max().(self, other: Self) -> Self;
1236
1237 /// Returns the minimum of the two numbers.
1238 fn minrust-analyzer cargo funty 2.0.0 Floating#min().(self, other: Self) -> Self;
1239
1240 /// Raw transmutation to `u32`.
1241 ///
1242 /// This is currently identical to `transmute::<f32, u32>(self)` on all
1243 /// platforms.
1244 ///
1245 /// See `from_bits` for some discussion of the portability of this operation
1246 /// (there are almost no issues).
1247 ///
1248 /// Note that this function is distinct from `as` casting, which attempts to
1249 /// preserve the *numeric* value, and not the bitwise value.
1250 fn to_bitsrust-analyzer cargo funty 2.0.0 Floating#to_bits().(self) -> Self::Rawrust-analyzer cargo funty 2.0.0 Floating#Raw#;
1251
1252 /// Raw transmutation from `u32`.
1253 ///
1254 /// This is currently identical to `transmute::<u32, f32>(v)` on all
1255 /// platforms. It turns out this is incredibly portable, for two reasons:
1256 ///
1257 /// - Floats and Ints have the same endianness on all supported platforms.
1258 /// - IEEE-754 very precisely specifies the bit layout of floats.
1259 ///
1260 /// However there is one caveat: prior to the 2008 version of IEEE-754, how
1261 /// to interpret the NaN signaling bit wasn't actually specified. Most
1262 /// platforms (notably x86 and ARM) picked the interpretation that was
1263 /// ultimately standardized in 2008, but some didn't (notably MIPS). As a
1264 /// result, all signaling NaNs on MIPS are quiet NaNs on x86, and
1265 /// vice-versa.
1266 ///
1267 /// Rather than trying to preserve signaling-ness cross-platform, this
1268 /// implementation favors preserving the exact bits. This means that
1269 /// any payloads encoded in NaNs will be preserved even if the result of
1270 /// this method is sent over the network from an x86 machine to a MIPS one.
1271 ///
1272 /// If the results of this method are only manipulated by the same
1273 /// architecture that produced them, then there is no portability concern.
1274 ///
1275 /// If the input isn't NaN, then there is no portability concern.
1276 ///
1277 /// If you don't care about signalingness (very likely), then there is no
1278 /// portability concern.
1279 ///
1280 /// Note that this function is distinct from `as` casting, which attempts to
1281 /// preserve the *numeric* value, and not the bitwise value.
1282 fn from_bitsrust-analyzer cargo funty 2.0.0 Floating#from_bits().(bits: Self::Rawrust-analyzer cargo funty 2.0.0 Floating#Raw#) -> Self;
1283 }
1284
1285 /// Declare that a type is exactly eight bits wide.
1286 pub trait Is8rust-analyzer cargo funty 2.0.0 Is8#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1287
1288 /// Declare that a type is exactly sixteen bits wide.
1289 pub trait Is16rust-analyzer cargo funty 2.0.0 Is16#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1290
1291 /// Declare that a type is exactly thirty-two bits wide.
1292 pub trait Is32rust-analyzer cargo funty 2.0.0 Is32#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1293
1294 /// Declare that a type is exactly sixty-four bits wide.
1295 pub trait Is64rust-analyzer cargo funty 2.0.0 Is64#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1296
1297 /// Declare that a type is exactly one hundred twenty-eight bits wide.
1298 pub trait Is128rust-analyzer cargo funty 2.0.0 Is128#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1299
1300 /// Declare that a type is eight or more bits wide.
1301 pub trait AtLeast8rust-analyzer cargo funty 2.0.0 AtLeast8#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1302
1303 /// Declare that a type is sixteen or more bits wide.
1304 pub trait AtLeast16rust-analyzer cargo funty 2.0.0 AtLeast16#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1305
1306 /// Declare that a type is thirty-two or more bits wide.
1307 pub trait AtLeast32rust-analyzer cargo funty 2.0.0 AtLeast32#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1308
1309 /// Declare that a type is sixty-four or more bits wide.
1310 pub trait AtLeast64rust-analyzer cargo funty 2.0.0 AtLeast64#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1311
1312 /// Declare that a type is one hundred twenty-eight or more bits wide.
1313 pub trait AtLeast128rust-analyzer cargo funty 2.0.0 AtLeast128#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1314
1315 /// Declare that a type is eight or fewer bits wide.
1316 pub trait AtMost8rust-analyzer cargo funty 2.0.0 AtMost8#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1317
1318 /// Declare that a type is sixteen or fewer bits wide.
1319 pub trait AtMost16rust-analyzer cargo funty 2.0.0 AtMost16#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1320
1321 /// Declare that a type is thirty-two or fewer bits wide.
1322 pub trait AtMost32rust-analyzer cargo funty 2.0.0 AtMost32#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1323
1324 /// Declare that a type is sixty-four or fewer bits wide.
1325 pub trait AtMost64rust-analyzer cargo funty 2.0.0 AtMost64#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1326
1327 /// Declare that a type is one hundred twenty-eight or fewer bits wide.
1328 pub trait AtMost128rust-analyzer cargo funty 2.0.0 AtMost128#: Numericrust-analyzer cargo funty 2.0.0 Numeric# {}
1329
1330 /// Creates new wrapper functions that forward to inherent items of the same
1331 /// name and signature.
1332 macro_rules! funcrust-analyzer cargo funty 2.0.0 func! {
1333 (
1334 $(@$std:literal)?
1335 $name:ident (self$(, $arg:ident: $t:ty)*) $(-> $ret:ty)?;
1336 $($tt:tt)*
1337 ) => {
1338 $(#[cfg(feature = $std)])?
1339 fn $name(self$(, $arg: $t)*) $(-> $ret)?
1340 {
1341 <Self>::$name(self$(, $arg)*)
1342 }
1343
1344 func!($($tt)*);
1345 };
1346 (
1347 $(@$std:literal)?
1348 $name:ident(&self$(, $arg:ident: $t:ty)*) $(-> $ret:ty)?;
1349 $($tt:tt)*
1350 ) => {
1351 $(#[cfg(feature = $std)])?
1352 fn $name(&self$(, $arg: $t)*) $(-> $ret)?
1353 {
1354 <Self>::$name(&self$(, $arg )*)
1355 }
1356
1357 func!($($tt)*);
1358 };
1359 (
1360 $(@$std:literal)?
1361 $name:ident(&mut self$(, $arg:ident: $t:ty)*) $(-> $ret:ty)?;
1362 $($tt:tt)*
1363 ) => {
1364 $(#[cfg(feature = $std)])?
1365 fn $name(&mut self$(, $arg: $t)*) $(-> $ret)?
1366 {
1367 <Self>::$name(&mut self$(, $arg)*)
1368 }
1369
1370 func!($($tt)*);
1371 };
1372 (
1373 $(@$std:literal)?
1374 $name:ident($($arg:ident: $t:ty),* $(,)?) $(-> $ret:ty)?;
1375 $($tt:tt)*
1376 ) => {
1377 $(#[cfg(feature = $std)])?
1378 fn $name($($arg: $t),*) $(-> $ret)?
1379 {
1380 <Self>::$name($($arg),*)
1381 }
1382
1383 func!($($tt)*);
1384 };
1385 () => {};
1386 }
1387
1388 macro_rules! impl_forrust-analyzer cargo funty 2.0.0 impl_for! {
1389 ( Fundamental => $($t:ty => $is_zero:expr),+ $(,)? ) => { $(
1390 impl Fundamental for $t {
1391 #[inline(always)]
1392 #[allow(clippy::redundant_closure_call)]
1393 fn as_bool(self) -> bool { ($is_zero)(self) }
1394
1395 #[inline(always)]
1396 fn as_char(self) -> Option<char> {
1397 core::char::from_u32(self as u32)
1398 }
1399
1400 #[inline(always)]
1401 fn as_i8(self) -> i8 { self as i8 }
1402
1403 #[inline(always)]
1404 fn as_i16(self) -> i16 { self as i16 }
1405
1406 #[inline(always)]
1407 fn as_i32(self) -> i32 { self as i32 }
1408
1409 #[inline(always)]
1410 fn as_i64(self) -> i64 { self as i64 }
1411
1412 #[inline(always)]
1413 fn as_i128(self) -> i128 { self as i128 }
1414
1415 #[inline(always)]
1416 fn as_isize(self) -> isize { self as isize }
1417
1418 #[inline(always)]
1419 fn as_u8(self) -> u8 { self as u8 }
1420
1421 #[inline(always)]
1422 fn as_u16(self) -> u16 { self as u16 }
1423
1424 #[inline(always)]
1425 fn as_u32(self) -> u32 { self as u32 }
1426
1427 #[inline(always)]
1428 fn as_u64(self) -> u64 { self as u64 }
1429
1430 #[inline(always)]
1431 fn as_u128(self) ->u128 { self as u128 }
1432
1433 #[inline(always)]
1434 fn as_usize(self) -> usize { self as usize }
1435
1436 #[inline(always)]
1437 fn as_f32(self) -> f32 { self as u32 as f32 }
1438
1439 #[inline(always)]
1440 fn as_f64(self) -> f64 { self as u64 as f64 }
1441 }
1442 )+ };
1443 ( Numeric => $($t:ty),+ $(,)? ) => { $(
1444 impl Numeric for $t {
1445 type Bytes = [u8; core::mem::size_of::<Self>()];
1446
1447 func! {
1448 to_be_bytes(self) -> Self::Bytes;
1449 to_le_bytes(self) -> Self::Bytes;
1450 to_ne_bytes(self) -> Self::Bytes;
1451 from_be_bytes(bytes: Self::Bytes) -> Self;
1452 from_le_bytes(bytes: Self::Bytes) -> Self;
1453 from_ne_bytes(bytes: Self::Bytes) -> Self;
1454 }
1455 }
1456 )+ };
1457 ( Integral => $($t:ty),+ $(,)? ) => { $(
1458 impl Integral for $t {
1459 const ZERO: Self = 0;
1460 const ONE: Self = 1;
1461 const MIN: Self = <Self>::min_value();
1462 const MAX: Self = <Self>::max_value();
1463
1464 const BITS: u32 = <Self>::BITS;
1465
1466 func! {
1467 min_value() -> Self;
1468 max_value() -> Self;
1469 from_str_radix(src: &str, radix: u32) -> Result<Self, ParseIntError>;
1470 count_ones(self) -> u32;
1471 count_zeros(self) -> u32;
1472 leading_zeros(self) -> u32;
1473 trailing_zeros(self) -> u32;
1474 leading_ones(self) -> u32;
1475 trailing_ones(self) -> u32;
1476 rotate_left(self, n: u32) -> Self;
1477 rotate_right(self, n: u32) -> Self;
1478 swap_bytes(self) -> Self;
1479 reverse_bits(self) -> Self;
1480 from_be(self) -> Self;
1481 from_le(self) -> Self;
1482 to_be(self) -> Self;
1483 to_le(self) -> Self;
1484 checked_add(self, rhs: Self) -> Option<Self>;
1485 checked_sub(self, rhs: Self) -> Option<Self>;
1486 checked_mul(self, rhs: Self) -> Option<Self>;
1487 checked_div(self, rhs: Self) -> Option<Self>;
1488 checked_div_euclid(self, rhs: Self) -> Option<Self>;
1489 checked_rem(self, rhs: Self) -> Option<Self>;
1490 checked_rem_euclid(self, rhs: Self) -> Option<Self>;
1491 checked_neg(self) -> Option<Self>;
1492 checked_shl(self, rhs: u32) -> Option<Self>;
1493 checked_shr(self, rhs: u32) -> Option<Self>;
1494 checked_pow(self, rhs: u32) -> Option<Self>;
1495 saturating_add(self, rhs: Self) -> Self;
1496 saturating_sub(self, rhs: Self) -> Self;
1497 saturating_mul(self, rhs: Self) -> Self;
1498 saturating_pow(self, rhs: u32) -> Self;
1499 wrapping_add(self, rhs: Self) -> Self;
1500 wrapping_sub(self, rhs: Self) -> Self;
1501 wrapping_mul(self, rhs: Self) -> Self;
1502 wrapping_div(self, rhs: Self) -> Self;
1503 wrapping_div_euclid(self, rhs: Self) -> Self;
1504 wrapping_rem(self, rhs: Self) -> Self;
1505 wrapping_rem_euclid(self, rhs: Self) -> Self;
1506 wrapping_neg(self) -> Self;
1507 wrapping_shl(self, rhs: u32) -> Self;
1508 wrapping_shr(self, rhs: u32) -> Self;
1509 wrapping_pow(self, rhs: u32) -> Self;
1510 overflowing_add(self, rhs: Self) -> (Self, bool);
1511 overflowing_sub(self, rhs: Self) -> (Self, bool);
1512 overflowing_mul(self, rhs: Self) -> (Self, bool);
1513 overflowing_div(self, rhs: Self) -> (Self, bool);
1514 overflowing_div_euclid(self, rhs: Self) -> (Self, bool);
1515 overflowing_rem(self, rhs: Self) -> (Self, bool);
1516 overflowing_rem_euclid(self, rhs: Self) -> (Self, bool);
1517 overflowing_neg(self) -> (Self, bool);
1518 overflowing_shl(self, rhs: u32) -> (Self, bool);
1519 overflowing_shr(self, rhs: u32) -> (Self, bool);
1520 overflowing_pow(self, rhs: u32) -> (Self, bool);
1521 pow(self, rhs: u32) -> Self;
1522 div_euclid(self, rhs: Self) -> Self;
1523 rem_euclid(self, rhs: Self) -> Self;
1524 }
1525 }
1526 )+ };
1527 ( Signed => $($t:ty),+ $(,)? ) => { $(
1528 impl Signed for $t {
1529 func! {
1530 checked_abs(self) -> Option<Self>;
1531 wrapping_abs(self) -> Self;
1532 overflowing_abs(self) -> (Self, bool);
1533 abs(self) -> Self;
1534 signum(self) -> Self;
1535 is_positive(self) -> bool;
1536 is_negative(self) -> bool;
1537 }
1538 }
1539 )+ };
1540 ( Unsigned => $($t:ty),+ $(,)? ) => { $(
1541 impl Unsigned for $t {
1542 func! {
1543 is_power_of_two(self) -> bool;
1544 next_power_of_two(self) -> Self;
1545 checked_next_power_of_two(self) -> Option<Self>;
1546 }
1547 }
1548 )+ };
1549 ( Floating => $($t:ident | $u:ty),+ $(,)? ) => { $(
1550 impl Floating for $t {
1551 type Raw = $u;
1552
1553 const RADIX: u32 = core::$t::RADIX;
1554 const MANTISSA_DIGITS: u32 = core::$t::MANTISSA_DIGITS;
1555 const DIGITS: u32 = core::$t::DIGITS;
1556 const EPSILON: Self = core::$t::EPSILON;
1557 const MIN: Self = core::$t::MIN;
1558 const MIN_POSITIVE: Self = core::$t::MIN_POSITIVE;
1559 const MAX: Self = core::$t::MAX;
1560 const MIN_EXP: i32 = core::$t::MIN_EXP;
1561 const MAX_EXP: i32 = core::$t::MAX_EXP;
1562 const MIN_10_EXP: i32 = core::$t::MIN_10_EXP;
1563 const MAX_10_EXP: i32 = core::$t::MAX_10_EXP;
1564 const NAN: Self = core::$t::NAN;
1565 const INFINITY: Self = core::$t::INFINITY;
1566 const NEG_INFINITY: Self = core::$t::NEG_INFINITY;
1567
1568 const PI: Self = core::$t::consts::PI;
1569 const FRAC_PI_2: Self = core::$t::consts::FRAC_PI_2;
1570 const FRAC_PI_3: Self = core::$t::consts::FRAC_PI_3;
1571 const FRAC_PI_4: Self = core::$t::consts::FRAC_PI_4;
1572 const FRAC_PI_6: Self = core::$t::consts::FRAC_PI_6;
1573 const FRAC_PI_8: Self = core::$t::consts::FRAC_PI_8;
1574 const FRAC_1_PI: Self = core::$t::consts::FRAC_1_PI;
1575 const FRAC_2_PI: Self = core::$t::consts::FRAC_2_PI;
1576 const FRAC_2_SQRT_PI: Self = core::$t::consts::FRAC_2_SQRT_PI;
1577 const SQRT_2: Self = core::$t::consts::SQRT_2;
1578 const FRAC_1_SQRT_2: Self = core::$t::consts::FRAC_1_SQRT_2;
1579 const E: Self = core::$t::consts::E;
1580 const LOG2_E: Self = core::$t::consts::LOG2_E;
1581 const LOG10_E: Self = core::$t::consts::LOG10_E;
1582 const LN_2: Self = core::$t::consts::LN_2;
1583 const LN_10: Self = core::$t::consts::LN_10;
1584
1585 func! {
1586 @"std" floor(self) -> Self;
1587 @"std" ceil(self) -> Self;
1588 @"std" round(self) -> Self;
1589 @"std" trunc(self) -> Self;
1590 @"std" fract(self) -> Self;
1591 @"std" abs(self) -> Self;
1592 @"std" signum(self) -> Self;
1593 @"std" copysign(self, sign: Self) -> Self;
1594 @"std" mul_add(self, a: Self, b: Self) -> Self;
1595 @"std" div_euclid(self, rhs: Self) -> Self;
1596 @"std" rem_euclid(self, rhs: Self) -> Self;
1597 @"std" powi(self, n: i32) -> Self;
1598 @"std" powf(self, n: Self) -> Self;
1599 @"std" sqrt(self) -> Self;
1600 @"std" exp(self) -> Self;
1601 @"std" exp2(self) -> Self;
1602 @"std" ln(self) -> Self;
1603 @"std" log(self, base: Self) -> Self;
1604 @"std" log2(self) -> Self;
1605 @"std" log10(self) -> Self;
1606 @"std" cbrt(self) -> Self;
1607 @"std" hypot(self, other: Self) -> Self;
1608 @"std" sin(self) -> Self;
1609 @"std" cos(self) -> Self;
1610 @"std" tan(self) -> Self;
1611 @"std" asin(self) -> Self;
1612 @"std" acos(self) -> Self;
1613 @"std" atan(self) -> Self;
1614 @"std" atan2(self, other: Self) -> Self;
1615 @"std" sin_cos(self) -> (Self, Self);
1616 @"std" exp_m1(self) -> Self;
1617 @"std" ln_1p(self) -> Self;
1618 @"std" sinh(self) -> Self;
1619 @"std" cosh(self) -> Self;
1620 @"std" tanh(self) -> Self;
1621 @"std" asinh(self) -> Self;
1622 @"std" acosh(self) -> Self;
1623 @"std" atanh(self) -> Self;
1624 is_nan(self) -> bool;
1625 is_infinite(self) -> bool;
1626 is_finite(self) -> bool;
1627 is_normal(self) -> bool;
1628 classify(self) -> FpCategory;
1629 is_sign_positive(self) -> bool;
1630 is_sign_negative(self) -> bool;
1631 recip(self) -> Self;
1632 to_degrees(self) -> Self;
1633 to_radians(self) -> Self;
1634 max(self, other: Self) -> Self;
1635 min(self, other: Self) -> Self;
1636 to_bits(self) -> Self::Raw;
1637 from_bits(bits: Self::Raw) -> Self;
1638 }
1639 }
1640 )+ };
1641 ( $which:ty => $($t:ty),+ $(,)? ) => { $(
1642 impl $which for $t {}
1643 )+ };
1644 }
1645
1646 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Fundamental =>
1647 bool => |this: bool| !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().this,
1648 char => |this| this != '\0',
1649 i8 => |this| this != 0,
1650 i16 => |this| this != 0,
1651 i32 => |this| this != 0,
1652 i64 => |this| this != 0,
1653 i128 => |this| this != 0,
1654 isize => |this| this != 0,
1655 u8 => |this| this != 0,
1656 u16 => |this| this != 0,
1657 u32 => |this| this != 0,
1658 u64 => |this| this != 0,
1659 u128 => |this| this != 0,
1660 usize => |this| this != 0,
1661 f32 => |this: f32| (-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f32][Neg]neg().Selfrust-analyzer cargo funty 2.0.0 impl#[f32][Fundamental]::EPSILONrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]EPSILON. ..= Selfrust-analyzer cargo funty 2.0.0 impl#[f32][Fundamental]::EPSILONrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/impl#[f32]EPSILON.).containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/impl#[`RangeInclusive<Idx>`]contains().(&this),
1662 f64 => |this: f64| (-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][Neg]neg().Selfrust-analyzer cargo funty 2.0.0 impl#[f64][Fundamental]::EPSILONrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]EPSILON. ..= Selfrust-analyzer cargo funty 2.0.0 impl#[f64][Fundamental]::EPSILONrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/impl#[f64]EPSILON.).containsrust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/impl#[`RangeInclusive<Idx>`]contains().(&this),
1663 );
1664 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Numeric => i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, usize, f32, f64);
1665 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Integral => i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, usize);
1666 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Signed => i8, i16, i32, i64, i128, isize);
1667 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Unsigned => u8, u16, u32, u64, u128, usize);
1668 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Floating => f32 | u32, f64 | u64);
1669
1670 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Is8rust-analyzer cargo funty 2.0.0 Is8# => i8, u8);
1671 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Is16rust-analyzer cargo funty 2.0.0 Is16# => i16, u16);
1672 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Is32rust-analyzer cargo funty 2.0.0 Is32# => i32, u32, f32);
1673 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Is64rust-analyzer cargo funty 2.0.0 Is64# => i64, u64, f64);
1674 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Is128rust-analyzer cargo funty 2.0.0 Is128# => i128, u128);
1675
1676 #[cfg(target_pointer_width = "16")]
1677 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Is16 => isize, usize);
1678
1679 #[cfg(target_pointer_width = "32")]
1680 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Is32 => isize, usize);
1681
1682 #[cfg(target_pointer_width = "64")]
1683 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(Is64rust-analyzer cargo funty 2.0.0 Is64# => isize, usize);
1684
1685 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtLeast8rust-analyzer cargo funty 2.0.0 AtLeast8# => i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, usize, f32, f64);
1686 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtLeast16rust-analyzer cargo funty 2.0.0 AtLeast16# => i16, i32, i64, i128, u16, u32, u64, u128, f32, f64);
1687 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtLeast32rust-analyzer cargo funty 2.0.0 AtLeast32# => i32, i64, i128, u32, u64, u128, f32, f64);
1688 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtLeast64rust-analyzer cargo funty 2.0.0 AtLeast64# => i64, i128, u64, u128, f64);
1689 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtLeast128rust-analyzer cargo funty 2.0.0 AtLeast128# => i128, u128);
1690
1691 #[cfg(any(
1692 target_pointer_width = "16",
1693 target_pointer_width = "32",
1694 target_pointer_width = "64"
1695 ))]
1696 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtLeast16rust-analyzer cargo funty 2.0.0 AtLeast16# => isize, usize);
1697
1698 #[cfg(any(target_pointer_width = "32", target_pointer_width = "64"))]
1699 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtLeast32rust-analyzer cargo funty 2.0.0 AtLeast32# => isize, usize);
1700
1701 #[cfg(target_pointer_width = "64")]
1702 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtLeast64rust-analyzer cargo funty 2.0.0 AtLeast64# => isize, usize);
1703
1704 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtMost8rust-analyzer cargo funty 2.0.0 AtMost8# => i8, u8);
1705 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtMost16rust-analyzer cargo funty 2.0.0 AtMost16# => i8, i16, u8, u16);
1706 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtMost32rust-analyzer cargo funty 2.0.0 AtMost32# => i8, i16, i32, u8, u16, u32, f32);
1707 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtMost64rust-analyzer cargo funty 2.0.0 AtMost64# => i8, i16, i32, i64, isize, u8, u16, u32, u64, usize, f32, f64);
1708 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtMost128rust-analyzer cargo funty 2.0.0 AtMost128# => i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, usize, f32, f64);
1709
1710 #[cfg(target_pointer_width = "16")]
1711 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtMost16 => isize, usize);
1712
1713 #[cfg(any(target_pointer_width = "16", target_pointer_width = "32"))]
1714 impl_forrust-analyzer cargo funty 2.0.0 impl_for!!(AtMost32 => isize, usize);
1715
1716 #[cfg(test)]
1717 mod testsrust-analyzer cargo funty 2.0.0 tests/ {
1718 use superrust-analyzer cargo funty 2.0.0 crate/::*;
1719 use static_assertionsrust-analyzer cargo static_assertions 1.1.0 crate/::*;
1720
1721 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(bool: Fundamentalrust-analyzer cargo funty 2.0.0 Fundamental#);
1722 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(char: Fundamentalrust-analyzer cargo funty 2.0.0 Fundamental#);
1723
1724 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(i8: Integralrust-analyzer cargo funty 2.0.0 Integral#, Signedrust-analyzer cargo funty 2.0.0 Signed#, Is8rust-analyzer cargo funty 2.0.0 Is8#);
1725 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(i16: Integralrust-analyzer cargo funty 2.0.0 Integral#, Signedrust-analyzer cargo funty 2.0.0 Signed#, Is16rust-analyzer cargo funty 2.0.0 Is16#);
1726 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(i32: Integralrust-analyzer cargo funty 2.0.0 Integral#, Signedrust-analyzer cargo funty 2.0.0 Signed#, Is32rust-analyzer cargo funty 2.0.0 Is32#);
1727 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(i64: Integralrust-analyzer cargo funty 2.0.0 Integral#, Signedrust-analyzer cargo funty 2.0.0 Signed#, Is64rust-analyzer cargo funty 2.0.0 Is64#);
1728 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(i128: Integralrust-analyzer cargo funty 2.0.0 Integral#, Signedrust-analyzer cargo funty 2.0.0 Signed#, Is128rust-analyzer cargo funty 2.0.0 Is128#);
1729 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(isize: Integralrust-analyzer cargo funty 2.0.0 Integral#, Signedrust-analyzer cargo funty 2.0.0 Signed#);
1730
1731 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(u8: Integralrust-analyzer cargo funty 2.0.0 Integral#, Unsignedrust-analyzer cargo funty 2.0.0 Unsigned#, Is8rust-analyzer cargo funty 2.0.0 Is8#);
1732 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(u16: Integralrust-analyzer cargo funty 2.0.0 Integral#, Unsignedrust-analyzer cargo funty 2.0.0 Unsigned#, Is16rust-analyzer cargo funty 2.0.0 Is16#);
1733 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(u32: Integralrust-analyzer cargo funty 2.0.0 Integral#, Unsignedrust-analyzer cargo funty 2.0.0 Unsigned#, Is32rust-analyzer cargo funty 2.0.0 Is32#);
1734 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(u64: Integralrust-analyzer cargo funty 2.0.0 Integral#, Unsignedrust-analyzer cargo funty 2.0.0 Unsigned#, Is64rust-analyzer cargo funty 2.0.0 Is64#);
1735 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(u128: Integralrust-analyzer cargo funty 2.0.0 Integral#, Unsignedrust-analyzer cargo funty 2.0.0 Unsigned#, Is128rust-analyzer cargo funty 2.0.0 Is128#);
1736 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(usize: Integralrust-analyzer cargo funty 2.0.0 Integral#, Unsignedrust-analyzer cargo funty 2.0.0 Unsigned#);
1737
1738 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(f32: Floatingrust-analyzer cargo funty 2.0.0 Floating#, Is32rust-analyzer cargo funty 2.0.0 Is32#);
1739 assert_impl_allrust-analyzer cargo static_assertions 1.1.0 assert_impl/assert_impl_all!!(f64: Floatingrust-analyzer cargo funty 2.0.0 Floating#, Is64rust-analyzer cargo funty 2.0.0 Is64#);
1740 }