検索

phrase: max: clip:
target: order:
Results of 51 - 60 of about 148 for println (0.131 sec.)
省略 - Rust By Example 日本語版 5773
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... タイムシグネチャを持つ。 fn elided_input(x: &i32) { println!("`elided_input`: {}", x); } fn annotated_input<'a ... >(x: &'a i32) { println!("`annotated_input`: {}", x); } // Similarly, `eli ... let x = 3; elided_input(&x); annotated_input(&x); println!("`elided_pass`: {}", elided_pass(&x)); println!(" ...
https://man.plustar.jp/rust/example/scope/lifetime/elision.html - [similar]
構造体 - Rust By Example 日本語版 5773
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ce = Either::Ref(&x); let number = Either::Num(y); println!("x is borrowed in {:?}", single); println!("x and ... y are borrowed in {:?}", double); println!("x is borrowed in {:?}", reference); println!("y ...
https://man.plustar.jp/rust/example/scope/lifetime/struct.html - [similar]
Option - Rust By Example 日本語版 5773
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... atch checked_division(dividend, divisor) { None => println!("{} / {} failed!", dividend, divisor), Some(quoti ... ent) => { println!("{} / {} = {}", dividend, divisor, quotient) }, } ... d. // `Some`をアンラップすると中の値を取得できる。 println!("{:?} unwraps to {:?}", optional_float, optional_ ... ic!` // `None`をアンラップしようとすると`panic!`る println!("{:?} unwraps to {:?}", none, none.unwrap()); } 関 ...
https://man.plustar.jp/rust/example/std/option.html - [similar]
?の導入 - Rust By Example 日本語版 5714
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ult<i32, ParseIntError>) { match result { Ok(n) => println!("n is {}", n), Err(e) => println!("Error: {}", e) ... ult<i32, ParseIntError>) { match result { Ok(n) => println!("n is {}", n), Err(e) => println!("Error: {}", e) ...
https://man.plustar.jp/rust/example/error/result/enter_question_mark.html - [similar]
while let - Rust By Example 日本語版 5714
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... た場合、値に応じて処理を分岐 Some(i) => { if i > 9 { println!("Greater than 9, quit!"); optional = None; } else ... { println!("`i` is `{:?}`. Try again.", i); optional = Some( ... `せよ。」 while let Some(i) = optional { if i > 9 { println!("Greater than 9, quit!"); optional = None; } else ... { println!("`i` is `{:?}`. Try again.", i); optional = Some( ...
https://man.plustar.jp/rust/example/flow_control/while_let.html - [similar]
Iterator::any - Rust By Example 日本語版 5714
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... r`は`&i32`を`yield`するので、`i32`へとデストラクト println!("2 in vec1: {}", vec1.iter() .any(|&x| x == 2)); ... 32`を`yield`するので、デストラクトする必要はない。 println!("2 in vec2: {}", vec2.into_iter().any(| x| x == 2 ... i32`. // 配列に対する`iter()`は`&i32`をyieldする。 println!("2 in array1: {}", array1.iter() .any(|&x| x == 2 ... `into_iter()`を使うと例外的に`&i32`を`yield`する。 println!("2 in array2: {}", array2.into_iter().any(|&x| x ...
https://man.plustar.jp/rust/example/fn/closures/closure_examples/iter_any.html - [similar]
クロージャ - Rust By Example 日本語版 5714
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... tion and closures. // 関数とクロージャを呼び出す。 println!("function: {}", function(i)); println!("closure_a ... nnotated: {}", closure_annotated(i)); println!("closure_inferred: {}", closure_inferred(i)); // ... ージャ。 // 戻り値の型は推論された。 let one = || 1; println!("closure returning one: {}", one()); } 関連キーワ ...
https://man.plustar.jp/rust/example/fn/closures.html - [similar]
macro_rules! - Rust By Example 日本語版 5714
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... パイルの段階で)このブロック内の内容に展開されます。 println!("Hello!"); }; } fn main() { // This call will exp ... and into `println!("Hello");` // この呼び出しは`println!("Hello");`に ... ェースを定義したくなることもあるでしょう。 例えば、 println! は、フォーマット文字列に依存した任意の数の引数を取 ...
https://man.plustar.jp/rust/example/macros.html - [similar]
refパターン - Rust By Example 日本語版 5714
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... よる借用は等価 let ref ref_c1 = c; let ref_c2 = &c; println!("ref_c1 equals ref_c2: {}", *ref_c1 == *ref_c2); ... ルなフィールドの値を変更する。 *mut_ref_to_y = 1; } println!("point is ({}, {})", point.x, point.y); println!( ... (_, ref mut last) = mutable_tuple; *last = 2u32; } println!("tuple is {:?}", mutable_tuple); } 関連キーワード ...
https://man.plustar.jp/rust/example/scope/borrow/ref.html - [similar]
演算子のオーバーロード - Rust By Example 日本語版 5714
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... tput = FooBar; fn add(self, _rhs: Bar) -> FooBar { println!("> Foo.add(Bar) was called"); FooBar } } // By re ... tput = BarFoo; fn add(self, _rhs: Foo) -> BarFoo { println!("> Bar.add(Foo) was called"); BarFoo } } fn main( ... ) { println!("Foo + Bar = {:?}", Foo + Bar); println!("Bar + F ...
https://man.plustar.jp/rust/example/trait/ops.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 NEXT