検索

phrase: max: clip:
target: order:
Results of 1 - 1 of about 1 for Centimeters (0.004 sec.)
継承(Derive) - Rust By Example 日本語版 9414
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ッタを利用して値をフォーマットするためのトレイト // `Centimeters`, a tuple struct that can be compared // `Centimet ... タプルになる #[derive(PartialEq, PartialOrd)] struct Centimeters(f64); // `Inches`, a tuple struct that can be prin ... ve(Debug)] struct Inches(i32); impl Inches { fn to_centimeters(&self) -> Centimeters { let &Inches(inches) = self ... ; Centimeters(inches as f64 * 2.54) } } // `Seconds`, a tuple st ...
https://man.plustar.jp/rust/example/trait/derive.html - [similar]
PREV 1 NEXT