検索
Results of 41 - 50 of about 148 for println (0.051 sec.)
- 構造体 - Rust By Example 日本語版 5937
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
/ Print debug struct // 構造体のデバッグ表示を行う println!("{:?}", peter); // Instantiate a `Point` // `Poin...
of the point // pointのフィールドにアクセスする。 println!("point coordinates: ({}, {})", point.x, point.y);...
`point` のフィールドの値を用いて生成したためである println!("second point: ({}, {})", bottom_right.x, bottom_...
of a tuple struct // タプルのフィールドにアクセス println!("pair contains {:?} and {:?}", pair.0, pair.1); /...
- https://man.plustar.jp/rust/example/custom_types/structs.html - [similar]
- デバッグ - Rust By Example 日本語版 5937
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
`{}`. // `{:?}`によるプリントは `{}`に似ています。 println!("{:?} months in a year.", 12); println!("{1:?} {0...
e` is printable! // `Structure`はプリント可能です! println!("Now {:?} will print!", Structure(3)); // The pro...
出力を`7`だけにするためにはどうしたらよいでしょう? println!("Now {:?} will print!", Deep(Structure(7))); } fm...
let peter = Person { name, age }; // Pretty print println!("{:#?}", peter); } 手動で fmt::Display を実装する...
- https://man.plustar.jp/rust/example/hello/print/print_debug.html - [similar]
- 所有権とムーブ - Rust By Example 日本語版 5937
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
の資源の所有権を取る。 fn destroy_box(c: Box<i32>) { println!("Destroying a box that contains {}", c); // `c` i...
used // 両方の値はそれぞれ独立に使うことができる。 println!("x is {}, and y is {}", x, y); // `a` is a pointe...
ヒープ_上の整数へのポインタ let a = Box::new(5i32); println!("a contains: {}", a); // *Move* `a` into `b` // `...
持たないため、ヒープ上のデータにアクセスできない。 //println!("a contains: {}", a); // TODO ^ Try uncommenting...
- https://man.plustar.jp/rust/example/scope/move.html - [similar]
- loop - Rust By Example 日本語版 5820
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
が使用できます。 fn main() { let mut count = 0u32; println!("Let's count until infinity!"); // Infinite loop...
// 無限ループ loop { count += 1; if count == 3 { println!("three"); // Skip the rest of this iteration // 残...
りの処理をスキップ continue; } println!("{}", count); if count == 5 { println!("OK, that'...
- https://man.plustar.jp/rust/example/flow_control/loop.html - [similar]
- タプル - Rust By Example 日本語版 5820
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
le` // TODO ^ `triple`に別の値を入れてみましょう。 println!("Tell me about {:?}", triple); // Match can be us...
nts // 2つ目と3つ目の値をデストラクト (0, y, z) => println!("First is `0`, `y` is {:?}, and `z` is {:?}", y,...
z), (1, ..) => println!("First is `1` and the rest doesn't matter"), // `...
` can be used to ignore the rest of the tuple _ => println!("It doesn't matter what they are"), // `_` means...
- https://man.plustar.jp/rust/example/flow_control/match/destructuring/destructure... - [similar]
- 複数のジェネリック境界 - Rust By Example 日本語版 5820
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
y}; fn compare_prints<T: Debug + Display>(t: &T) { println!("Debug: `{:?}`", t); println!("Display: `{}`", t)...
compare_types<T: Debug, U: Debug>(t: &T, u: &U) { println!("t: `{:?}`", t); println!("u: `{:?}`", u); } fn m...
- https://man.plustar.jp/rust/example/generics/multi_bounds.html - [similar]
- Partial moves - Rust By Example 日本語版 5820
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
referenced let Person { name, ref age } = person; println!("The person's age is {}", age); println!("The per...
tially moved value: `person` partial move occurs //println!("The person struct is {:?}", person); // `person`...
ed but `person.age` can be used as it is not moved println!("The person's age from person struct is {}", pers...
- https://man.plustar.jp/rust/example/scope/move/partial_move.html - [similar]
- 関数 - Rust By Example 日本語版 5773
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
zzbuzz(n: u32) -> () { if is_divisible_by(n, 15) { println!("fizzbuzz"); } else if is_divisible_by(n, 3) { pr...
intln!("fizz"); } else if is_divisible_by(n, 5) { println!("buzz"); } else { println!("{}", n); } } // When...
- https://man.plustar.jp/rust/example/fn.html - [similar]
- super と self - Rust By Example 日本語版 5773
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ディングを避けるために使用できます。 fn function() { println!("called `function()`"); } mod cool { pub fn funct...
ion() { println!("called `cool::function()`"); } } mod my { fn fun...
ction() { println!("called `my::function()`"); } mod cool { pub fn f...
unction() { println!("called `my::cool::function()`"); } } pub fn indi...
- https://man.plustar.jp/rust/example/mod/super.html - [similar]
- use宣言 - Rust By Example 日本語版 5773
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ested::function as other_function; fn function() { println!("called `function()`"); } mod deeply { pub mod ne...
sted { pub fn function() { println!("called `deeply::nested::function()`"); } } } fn...
:function`へ、より簡潔にアクセス other_function(); println!("Entering block"); { // This is equivalent to `us...
)`のシャドウイングはこのブロック内のみ function(); println!("Leaving block"); } function(); } 関連キーワード:...
- https://man.plustar.jp/rust/example/mod/use.html - [similar]