検索

phrase: max: clip:
target: order:
Results of 1 - 3 of about 3 for elem (0.011 sec.)
型推論 - Rust By Example 日本語版 11924
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ecause of the annotation, the compiler knows that `elem` has type u8. // アノテーションのおかげで、コンパイ ... ラは`elem`がu8型であることがわかる。 let elem = 5u8; // Crea ... >`)であるということだけを把握している。 // Insert `elem` in the vector. // `elem`をベクトルに挿入 vec.push ... (elem); // Aha! Now the compiler knows that `vec` is a v ...
https://man.plustar.jp/rust/example/types/inference.html - [similar]
Rust By Example 日本語版 8147
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... tter) -> fmt::Result { // Write strictly the first element into the supplied output // stream: `f`. Return ... count, v) in vec.iter().enumerate() { // For every element except the first, add a comma. // Use the ? ope ... ed pair is {:?}", reverse(pair)); // To create one element tuples, the comma is required to tell them apar ... と区別するため、カンマが必要になる。 println!("one element tuple: {:?}", (5u32,)); println!("just an integ ...
https://man.plustar.jp/rust/example/print.html - [similar]
テストケース: 連結リスト - Rust By Example 日本語版 7813
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... *; enum List { // Cons: Tuple struct that wraps an element and a pointer to the next node // Cons: これは、 ... onsume a list, and return the same list with a new element at its front // リストを受け取り、その始端に新し ... い要素を付加したものを返す関数。 fn prepend(self, elem: u32) -> List { // `Cons` also has type List // こ ... ` 自体も、その第2要素もどちらもlist型である。 Cons(elem, Box::new(self)) } // Return the length of the lis ...
https://man.plustar.jp/rust/example/custom_types/enum/testcase_linked_list.html - [similar]
PREV 1 NEXT