Rust 使用trait 来描述这一组相同的行为,简单的说trait 就是一组函数的集合。 ... f32 { (self.x.powi(2) + self.y.powi(2)).sqrt() } } 复制代码 ...
確定! 回上一頁