trait HasName: Greeter { fn name(&self) -> &'static str; ... Rust 內建了很多的trait ,只要實作了這些trait 就能讓Rust 知道你的型態能提供哪些功能,也能被標準 ...
確定! 回上一頁