検索

phrase: max: clip:
target: order:
Results of 101 - 110 of about 193 for let (0.072 sec.)
use - Rust By Example 日本語版 5095
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. クロー ... しているため、`Status::Poor`と書いていることに等しい let status = Poor; // Equivalent to `Work::Civilian`. ... // `Work::Civilian`に等しい let work = Civilian; match status { // Note the lack o ...
https://man.plustar.jp/rust/example/custom_types/enum/enum_use.html - [similar]
早期リターン - Rust By Example 日本語版 5095
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. クロー ... _number_str: &str) -> Result<i32, ParseIntError> { let first_number = match first_number_str.parse::<i32> ... mber) => first_number, Err(e) => return Err(e), }; let second_number = match second_number_str.parse::<i3 ...
https://man.plustar.jp/rust/example/error/result/early_returns.html - [similar]
メソッド - Rust By Example 日本語版 5095
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. クロー ... value(&self) -> &T { &self.gen_val } } fn main() { let x = Val { val: 3.0 }; let y = GenVal { gen_val: 3i ...
https://man.plustar.jp/rust/example/generics/impl.html - [similar]
? - Rust By Example 日本語版 5095
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. クロー ... "fails", then `DivisionByZero` will be `return`ed let ratio = div(x, y)?; // if `ln` "fails", then `NonP ... ositiveLogarithm` will be `return`ed let ln = ln(ratio)?; sqrt(ln) } pub fn op(x: f64, y: f ...
https://man.plustar.jp/rust/example/std/result/question_mark.html - [similar]
他言語関数インターフェイス - Rust By Example 日本語版 5095
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. クロー ... { unsafe { ccosf(z) } } fn main() { // z = -1 + 0i let z = Complex { re: -1., im: 0. }; // calling a fore ... ign function is an unsafe operation let z_sqrt = unsafe { csqrtf(z) }; println!("the squar ...
https://man.plustar.jp/rust/example/std_misc/ffi.html - [similar]
Returning Traits with dyn - Rust By Example 日本語版 5095
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. クロー ... ements Animal, but we don't know which one at compile time. fn random_animal(random_number: f64) -> Box<d ... heep {}) } else { Box::new(Cow {}) } } fn main() { let random_number = 0.234; let animal = random_animal( ...
https://man.plustar.jp/rust/example/trait/dyn.html - [similar]
型推論 - Rust By Example 日本語版 5095
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. クロー ... かげで、コンパイラは`elem`がu8型であることがわかる。 let elem = 5u8; // Create an empty vector (a growable ... array). // 空のベクトル(可変長の配列)を生成 let mut vec = Vec::new(); // At this point the compile ...
https://man.plustar.jp/rust/example/types/inference.html - [similar]
?によるOptionのアンパック - Rust By Example 日本語版 5041
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. クロー ... `の場合、内部の`u8`型の値が`next_age`に代入される。 let next_age: u8 = current_age?; Some(format!("Next ye ... self.job?.phone_number?.area_code } } fn main() { let p = Person { job: Some(Job { phone_number: Some(Ph ...
https://man.plustar.jp/rust/example/error/option_unwrap/question_mark.html - [similar]
テストケース: リスト - Rust By Example 日本語版 5041
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. クロー ... uple indexing, // and create a reference to `vec`. let vec = &self.0; write!(f, "[")?; // Iterate over `v ... Result`の値を返す。 write!(f, "]") } } fn main() { let v = List(vec![1, 2, 3]); println!("{}", v); } 演習 ...
https://man.plustar.jp/rust/example/hello/print/print_display/testcase_list.html - [similar]
配列とスライス - Rust By Example 日本語版 5041
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 xs: [i32; 5] = [1, 2, 3, 4, 5]; // All elements ca ... zed to the same value // すべての要素を0にする場合 let ys: [i32; 500] = [0; 500]; // Indexing starts at 0 ...
https://man.plustar.jp/rust/example/primitives/array.html - [similar]
PREV 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 NEXT