可以使用type关键字声明类型的别名。
比如:
type Name = String;
然后就可以把Name当做String类型来使用:
let x: Name = "MyName".to_string();
https://doc.rust-lang.org/book/first-edition/type-aliases.html
https://wiki.jikexueyuan.com/project/rust/type-aliases.html
什么是Rust类型关键字?