... 提供實作來共用程式碼了,這同時也是Rust 泛型的基礎。 trait Movable { fn move(&self); } struct Human; impl Movable for Human { fn move(&self) { println!(
確定! 回上一頁