1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Type conversionsRust offers a multitude of ways to convert a value of a given type into another type. The simplest form of type conversion is a type cast expression. It is denoted with the binary operator Rust also offers traits that facilitate type conversions upon implementation. These traits can be found under the
Furthermore, the These should be the main ways within the standard library to convert data into your desired types. Further informationThese are not directly covered in the book, but the standard library has a great documentation for it. |
