You can define methods on types you own in impl blocks. Rust code. #[derive(Debug)] struct Foobar(i64); impl Foobar { fn negated(self) -> i64 ...
確定! 回上一頁