検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 19 for Contains (0.014 sec.)
関連型 - Rust By Example 日本語版 13438
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... の`type`とは // 異なることに注意しましょう。) trait Contains { type A; type B; // Updated syntax to refer to th ... するために、構文が // アップデートされています。 fn contains(&self, &Self::A, &Self::B) -> bool; } } Contains... difference<A, B, C>(container: &C) -> i32 where C: Contains<A, B> { ... } // Using associated types // 使用する ... 場合 fn difference<C: Contains>(container: &C) -> i32 { ... } 前セクションの例を関 ...
https://man.plustar.jp/rust/example/generics/assoc_items/types.html - [similar]
関連型が必要になる状況 - Rust By Example 日本語版 13096
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... リック型を明記 しなくてはなりません 。 以下の例では Contains トレイトはジェネリック型 A と B の使用を許していま ... す。その後、 Container 型に対して Contains を実装していますが、その際後に fn difference() が使 ... ように、 A 、 B はそれぞれ i32 と明記されています。 Contains はジェネリックトレイトなので、 fn difference() では ... / また、最初と最後の値を取得することもできる trait Contains<A, B> { fn contains(&self, _: &A, _: &B) -> bool; ...
https://man.plustar.jp/rust/example/generics/assoc_items/the_problem.html - [similar]
所有権とムーブ - Rust By Example 日本語版 9169
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... box(c: Box<i32>) { println!("Destroying a box that contains {}", c); // `c` is destroyed and the memory freed ... 整数へのポインタ let a = Box::new(5i32); println!("a contains: {}", a); // *Move* `a` into `b` // `a`を`b`に *ム ... 、ヒープ上のデータにアクセスできない。 //println!("a contains: {}", a); // TODO ^ Try uncommenting this line // ... が許さない。 // エラー! 上述の理由より //println!("b contains: {}", b); // TODO ^ Try uncommenting this line // ...
https://man.plustar.jp/rust/example/scope/move.html - [similar]
要素の捕捉 - Rust By Example 日本語版 8930
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ティクスではない。 let haystack = vec![1, 2, 3]; let contains = move |needle| haystack.contains(needle); println ... !("{}", contains(&1)); println!("{}", contains(&4)); // println!("T ...
https://man.plustar.jp/rust/example/fn/closures/capture.html - [similar]
ミュータビリティ - Rust By Example 日本語版 8930
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... able_box = Box::new(5u32); println!("immutable_box contains {}", immutable_box); // Mutability error // ミュー ... mutable_box = immutable_box; println!("mutable_box contains {}", mutable_box); // Modify the contents of the b ... 容を変更 *mutable_box = 4; println!("mutable_box now contains {}", mutable_box); } 関連キーワード: box , ミュータ ...
https://man.plustar.jp/rust/example/scope/move/mut.html - [similar]
Rust By Example 日本語版 8366
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... mes" // Create a structure named `Structure` which contains an `i32`. // `i32`保持する `Structure` という名の構 ... r `Structure`. `Structure` // is a structure which contains a single `i32`. // `Structure`という構造体のための ... . This is // a tuple struct named `Structure` that contains an `i32`. // `fmt::Display`を実装するための構造体を ... uct // タプルのフィールドにアクセス println!("pair contains {:?} and {:?}", pair.0, pair.1); // Destructure a ...
https://man.plustar.jp/rust/example/print.html - [similar]
open - Rust By Example 日本語版 8247
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... t read {}: {}", display, why), Ok(_) => print!("{} contains:\n{}", display, s), } // `file` goes out of scope, ... !" > hello.txt $ rustc open.rs && ./open hello.txt contains: Hello World! (気が向いたなら、上記の例を様々な形 ...
https://man.plustar.jp/rust/example/std_misc/file/open.html - [similar]
構造体 - Rust By Example 日本語版 8127
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... uct // タプルのフィールドにアクセス println!("pair contains {:?} and {:?}", pair.0, pair.1); // Destructure a ... let Pair(integer, decimal) = pair; println!("pair contains {:?} and {:?}", integer, decimal); } 演習 Rectangl ...
https://man.plustar.jp/rust/example/custom_types/structs.html - [similar]
構造体の場合 - Rust By Example 日本語版 8127
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ドにも普通にアクセスできる。 println!("The open box contains: {}", open_box.contents); // Public structs with p ... ルドはプライベートです。 //println!("The closed box contains: {}", _closed_box.contents); // TODO ^ Try uncomme ...
https://man.plustar.jp/rust/example/mod/struct_visibility.html - [similar]
Returning Traits with dyn - Rust By Example 日本語版 7666
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... object directly, our functions return a Box which contains some Animal . A box is just a reference to some me ...
https://man.plustar.jp/rust/example/trait/dyn.html - [similar]
PREV 1 2 NEXT