検索

phrase: max: clip:
target: order:
Results of 1 - 2 of about 2 for foot (0.005 sec.)
テストケース: 単位を扱う - Rust By Example 日本語版 11228
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .0, PhantomData) } } fn main() { // Specifies `one_foot` to have phantom type parameter `Inch`. // `one_fo ... ot`が幽霊型`Inch`を持つように明示する。 let one_foot: Length<Inch> = Length(12.0, PhantomData); // `one ... mplements `Copy`, `add()` does not consume // `one_foot` and `one_meter` but copies them into `self` and ` ... th`は`Copy`トレイトを持っているため、`add()`は`one_foot`及び`one_meter` // を消費する代わりにそのコピーを作 ...
https://man.plustar.jp/rust/example/generics/phantom/testcase_units.html - [similar]
継承(Derive) - Rust By Example 日本語版 7485
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... e // TODO ^ この行をアンコメントしてみましょう let foot = Inches(12); println!("One foot equals {:?}", foo ... t); let meter = Centimeters(100.0); let cmp = if foot.to_centimeters() < meter { "smaller" } else { "big ... ger" }; println!("One foot is {} than one meter.", cmp); } 参照 derive 関連キ ...
https://man.plustar.jp/rust/example/trait/derive.html - [similar]
PREV 1 NEXT