検索

phrase: max: clip:
target: order:
Results of 11 - 20 of about 193 for let (0.039 sec.)
基本データ型 - Rust By Example 日本語版 6877
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー ... Variables can be type annotated. // 変数に型を指定 let logical: bool = true; let a_float: f64 = 1.0; // R ... egular annotation // 通常の型指定 let an_integer = 5i32; // Suffix annotation // サフィッ ... // サフィックスを指定しない場合、デフォルトを選択 let default_float = 3.0; // `f64` let default_integer ...
https://man.plustar.jp/rust/example/primitives.html - [similar]
変数束縛 - Rust By Example 日本語版 6823
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー ... 定の負担を大幅に軽減できます。 値(リテラルなど)は let を用いて変数に束縛することができます。 fn main() { ... let an_integer = 1u32; let a_boolean = true; let unit ... teger` // `an_integer`を`copied_integer`へとコピー let copied_integer = an_integer; println!("An integer: ...
https://man.plustar.jp/rust/example/variable_bindings.html - [similar]
OptionからResultを取り出す - Rust By Example 日本語版 6714
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー ... rst.parse::<i32>().map(|n| 2 * n) }) } fn main() { let numbers = vec!["42", "93", "18"]; let empty = vec! ... []; let strings = vec!["tofu", "93", "18"]; println!("The ... Vec<&str>) -> Result<Option<i32>, ParseIntError> { let opt = vec.first().map(|first| { first.parse::<i32> ...
https://man.plustar.jp/rust/example/error/multiple_error_types/option_result.htm... - [similar]
スコープとシャドーイング - Rust By Example 日本語版 6714
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー ... ain function // この変数はmain関数内が生息域です。 let long_lived_binding = 1; // This is a block, and ha ... lock // この変数はこのブロック内のみに存在します。 let short_lived_binding = 2; println!("inner short: {} ... はスコープ外の同名の変数を *シャドーイング* します。 let long_lived_binding = 5_f32; println!("inner long: ...
https://man.plustar.jp/rust/example/variable_bindings/scope.html - [similar]
Result - Rust By Example 日本語版 6551
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー ... er_str: &str, second_number_str: &str) -> i32 { // Let's try using `unwrap()` to get the number out. Will ... 数字を取り出してみましょう。痛い目を見るでしょうか? let first_number = first_number_str.parse::<i32>().unw ... rap(); let second_number = second_number_str.parse::<i32>().u ...
https://man.plustar.jp/rust/example/error/result.html - [similar]
メソッド - Rust By Example 日本語版 6551
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー ... `はドット演算子によって構造体のfieldを参照できる。 let Point { x: x1, y: y1 } = self.p1; let Point { x: x ... * (y1 - y2)).abs() } fn perimeter(&self) -> f64 { let Point { x: x1, y: y1 } = self.p1; let Point { x: x ... f) { // Destructure `self` // `self`をデストラクト let Pair(first, second) = self; println!("Destroying P ...
https://man.plustar.jp/rust/example/fn/methods.html - [similar]
エイリアス - Rust By Example 日本語版 6551
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー ... truct Point { x: i32, y: i32, z: i32 } fn main() { let mut point = Point { x: 0, y: 0, z: 0 }; let borrow ... ed_point = &point; let another_borrow = &point; // Data can be accessed v ... ため、 // ミュータブルに借用することができない。 // let mutable_borrow = &mut point; // TODO ^ Try uncomme ...
https://man.plustar.jp/rust/example/scope/borrow/alias.html - [similar]
構造体 - Rust By Example 日本語版 6551
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー ... Either<'a> { Num(i32), Ref(&'a i32), } fn main() { let x = 18; let y = 15; let single = Borrowed(&x); let ... double = NamedBorrowed { x: &x, y: &y }; let reference = Either::Ref(&x); let number = Either:: ... ", number); } 参照 struct s 関連キーワード: 関数 , let , Result , Borrowed , Rust , Example , By , 参照 , ...
https://man.plustar.jp/rust/example/scope/lifetime/struct.html - [similar]
Combinators: map - Rust By Example 日本語版 6497
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー ... ntln!("Oh no! It wasn't edible."), } } fn main() { let apple = Some(Food::Apple); let carrot = Some(Food: ... :Carrot); let potato = None; let cooked_apple = cook(chop(peel(a ... pple))); let cooked_carrot = cook(chop(peel(carrot))); // Let's ...
https://man.plustar.jp/rust/example/error/option_unwrap/map.html - [similar]
式 - Rust By Example 日本語版 6497
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構造体 8.5.2. ガード 8.5.3. バインディング 8.6. if let 8.7. while let 9. 関数 ❱ 9.1. メソッド 9.2. クロー ... )です fn main() { // variable binding // 変数束縛 let x = 5; // expression; // 式; x; x + 1; 15; } コード ... で終わる場合は返り値は () になります。 fn main() { let x = 5u32; let y = { let x_squared = x * x; let x_c ... の式は`y`に代入されます。 x_cube + x_squared + x }; let z = { // The semicolon suppresses this expression ...
https://man.plustar.jp/rust/example/expression.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 11 NEXT