Join my Laravel for REST API's course on Udemy 👀

Create a type alias in Rust

August 26, 2022  ‐ 1 min read

By using the type statement in Rust we can alias an existing native type to a newly named type.

See for example the following:

type Age = u32;

fn main() {
    let age: Age = 28;
}