What Are Type Aliases in Rust?

Type aliases in Rust create a shorthand name for an existing type using the `type` keyword to improve code readability.

Type aliases in Rust let you create a shorthand name for an existing type using the type keyword. This improves code readability and reduces repetition when dealing with complex or long type signatures.

type Kilometers = f64;

fn distance(km: Kilometers) {
    println!("Distance: {} km", km);
}