検索

phrase: max: clip:
target: order:
Results of 11 - 20 of about 193 for new (0.035 sec.)
ハッシュマップ - Rust By Example 日本語版 7833
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... int) を、デフォルトの容量で作成するときは HashMap::new() を用います。後者が推奨されています。 use std::co ... gain?" } } fn main() { let mut contacts = HashMap::new(); contacts.insert("Daniel", "798-1364"); contacts ... sert()` returns `None` // if the inserted value is new, `Some(value)` otherwise // `HashMap::insert()`は ...
https://man.plustar.jp/rust/example/std/hash.html - [similar]
トレイト - Rust By Example 日本語版 7833
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... / `Self` はこのトレイトを実装している型になる。 fn new(name: &'static str) -> Self; // Method signatures; ... heep`. // `Self`は実装対象の型: ここでは`Sheep` fn new(name: &'static str) -> Sheep { Sheep { name: name, ... ノテーションが必須。 let mut dolly: Sheep = Animal::new("Dolly"); // TODO ^ Try removing the type annotati ...
https://man.plustar.jp/rust/example/trait.html - [similar]
ドキュメンテーション - Rust By Example 日本語版 7627
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... す。) /// use doc::Person; /// let person = Person::new("name"); /// ``` pub fn new(name: &str) -> Person ... !", self.name); } } fn main() { let john = Person::new("John"); john.hello(); } To run the tests, first b ...
https://man.plustar.jp/rust/example/meta/doc.html - [similar]
RAII - Rust By Example 日本語版 7627
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... the heap // 整数をヒープ上に確保 let _box1 = Box::new(3i32); // `_box1` is destroyed here, and memory ge ... the heap // 整数をヒープ上に確保 let _box2 = Box::new(5i32); // A nested scope: // ネストしたスコープ { ... the heap // 整数をヒープ上に確保 let _box3 = Box::new(4i32); // `_box3` is destroyed here, and memory ge ...
https://man.plustar.jp/rust/example/scope/raii.html - [similar]
Raw identifiers - Rust By Example 日本語版 7225
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... . This is particularly useful when Rust introduces new keywords, and a library using an older edition of ... on with the same name as a keyword introduced in a newer edition. For example, consider a crate foo compi ... unction named try . This keyword is reserved for a new feature in the 2018 edition, so without raw identi ...
https://man.plustar.jp/rust/example/compatibility/raw_identifiers.html - [similar]
open - Rust By Example 日本語版 7029
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... 目的ファイルに対する`Path`を作成 let path = Path::new("hello.txt"); let display = path.display(); // Ope ... む。`io::Result<useize>`を返す。 let mut s = String::new(); match file.read_to_string(&mut s) { Err(why) => ...
https://man.plustar.jp/rust/example/std_misc/file/open.html - [similar]
Returning Traits with dyn - Rust By Example 日本語版 7029
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... -> Box<dyn Animal> { if random_number < 0.5 { Box::new(Sheep {}) } else { Box::new(Cow {}) } } fn main() ...
https://man.plustar.jp/rust/example/trait/dyn.html - [similar]
エイリアス - Rust By Example 日本語版 7029
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... のようなプリミティブ型です。 // `NanoSecond` is a new name for `u64`. // `NanoSecond` を `u64`の別名とし ... ny extra type safety, because // aliases are *not* new types // 型のエイリアスは、元の型をより型安全にして ...
https://man.plustar.jp/rust/example/types/alias.html - [similar]
Tests - Rust By Example 日本語版 6823
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... e if it doesn't exist. let mut file = OpenOptions::new() .append(true) .create(true) .open("ferris.txt") ... e if it doesn't exist. let mut file = OpenOptions::new() .append(true) .create(true) .open("ferris.txt") ...
https://man.plustar.jp/rust/example/cargo/test.html - [similar]
構造体の場合 - Rust By Example 日本語版 6823
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... ブリックなコンストラクタメソッドを持つ構造体 pub fn new(contents: T) -> ClosedBox<T> { ClosedBox { content ... することは可能。 let _closed_box = my::ClosedBox::new("classified information"); // and the private fiel ...
https://man.plustar.jp/rust/example/mod/struct_visibility.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 11 NEXT