TODO 函数返回透明类型 -> impl xxTrait
当一个函数声明返回 impl Trait 时,它意味着函数将返回一个实现了 Trait 的某个具体类型,而这个具体类型对于用户是透明的。Rust 使用 impl Trait 来允许函数返回一个具体类型,但又不暴露这个类型的细节。
This post is licensed under
CC BY 4.0
by the author.