検索

phrase: max: clip:
target: order:
Results of 41 - 50 of about 193 for let (0.056 sec.)
型キャスティング - Rust By Example 日本語版 5964
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. クロー ... 視する。 #![allow(overflowing_literals)] fn main() { let decimal = 65.4321_f32; // Error! No implicit conve ... rsion // エラー! 暗黙的な型変換はできない。 let integer: u8 = decimal; // FIXME ^ Comment out this ... ましょう。 // Explicit conversion // 明示的な型変換 let integer = decimal as u8; let character = integer a ...
https://man.plustar.jp/rust/example/types/cast.html - [similar]
Stringとの型変換 - Rust By Example 日本語版 5910
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. クロー ... Circle of radius {}", self.radius) } } fn main() { let circle = Circle { radius: 6 }; println!("{}", circ ... て FromStr トレイトを実装するだけです。 fn main() { let parsed: i32 = "5".parse().unwrap(); let turbo_pars ... ed = "10".parse::<i32>().unwrap(); let sum = parsed + turbo_parsed; println!("Sum: {:?}", ...
https://man.plustar.jp/rust/example/conversion/string.html - [similar]
Diverging functions - Rust By Example 日本語版 5910
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. クロー ... the return value. fn some_fn() { () } fn main() { let a: () = some_fn(); println!("This function returns ... to the caller. #![feature(never_type)] fn main() { let x: ! = panic!("This call never returns."); println ... n main() { fn sum_odd_numbers(up_to: u32) -> u32 { let mut acc = 0; for i in 0..up_to { // Notice that th ...
https://man.plustar.jp/rust/example/fn/diverging.html - [similar]
高階関数 - Rust By Example 日本語版 5910
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. クロー ... e sum of all the squared odd numbers under 1000"); let upper = 1000; // Imperative approach // Declare ac ... グラミングによるアプローチ // 値を蓄積する変数を宣言 let mut acc = 0; // Iterate: 0, 1, 2, ... to infinity ... する for n in 0.. { // Square the number // 値を2乗 let n_squared = n * n; if n_squared >= upper { // Brea ...
https://man.plustar.jp/rust/example/fn/hof.html - [similar]
ジェネリクス - Rust By Example 日本語版 5910
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. クロー ... es `A`. // `Single`は具象型で、`A`のみを受け取る。 let _s = Single(A); // Create a variable `_char` of ty ... Gen`には明示的な型パラメータ // が与えられている。 let _char: SingleGen<char> = SingleGen('a'); // `Singl ... 型の変数には明示的に型パラメータを与えなくてもよい。 let _t = SingleGen(A); // Uses `A` defined at the top. ...
https://man.plustar.jp/rust/example/generics.html - [similar]
引数のパース - Rust By Example 日本語版 5910
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. クロー ... or decrease given integer by one."); } fn main() { let args: Vec<String> = env::args().collect(); match a ... passed // コマンドが一つと引数が一つの場合 3 => { let cmd = &args[1]; let num = &args[2]; // parse the n ... umber // 数字をパース let number: i32 = match num.parse() { Ok(n) => { n }, ...
https://man.plustar.jp/rust/example/std_misc/arg/matching.html - [similar]
open - Rust By Example 日本語版 5910
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. クロー ... e desired file // 目的ファイルに対する`Path`を作成 let path = Path::new("hello.txt"); let display = path. ... み専用モードで開く。これは`io::Result<File>`を返す。 let mut file = match File::open(&path) { // The `descr ... 中身を文字列に読み込む。`io::Result<useize>`を返す。 let mut s = String::new(); match file.read_to_string(& ...
https://man.plustar.jp/rust/example/std_misc/file/open.html - [similar]
メモリ解放 - Rust By Example 日本語版 5910
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!("> Dropping {}", self.name); } } fn main() { let _a = Droppable { name: "a" }; // block A { let _b ... = Droppable { name: "b" }; // block B { let _c = Droppable { name: "c" }; let _d = Droppable { ... キーワード: 関数 , メモリ , 解放 , block , Result , let , Droppable , println , Rust , By ...
https://man.plustar.jp/rust/example/trait/drop.html - [similar]
Iterator::any - Rust By Example 日本語版 5856
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. クロー ... ます。 F: FnMut(Self::Item) -> bool {} } fn main() { let vec1 = vec![1, 2, 3]; let vec2 = vec![4, 5, 6]; // ... in vec2: {}", vec2.into_iter().any(| x| x == 2)); let array1 = [1, 2, 3]; let array2 = [4, 5, 6]; // `it ... ::any 関連キーワード: 関数 , iter , Result , ter , let , By , Rust , Example , vec , エラー ...
https://man.plustar.jp/rust/example/fn/closures/closure_examples/iter_any.html - [similar]
クロージャ - Rust By Example 日本語版 5856
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 closure_annotated = |i: i32| -> i32 { i + 1 }; let ... closure_inferred = |i | i + 1 ; let i = 1; // Call the function and closures. // 関数と ... i32`を返すクロージャ。 // 戻り値の型は推論された。 let one = || 1; println!("closure returning one: {}", ...
https://man.plustar.jp/rust/example/fn/closures.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 11 12 13 14 NEXT