検索

phrase: max: clip:
target: order:
Results of 1 - 8 of about 8 for person (0.022 sec.)
Partial moves - Rust By Example 日本語版 12399
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... still be used. fn main() { #[derive(Debug)] struct Person { name: String, age: u8, } let person = Person { n ... om("Alice"), age: 20, }; // `name` is moved out of person, but `age` is referenced let Person { name, ref ag ... e } = person; println!("The person's age is {}", age); println! ... ("The person's name is {}", name); // Error! borrow of partiall ...
https://man.plustar.jp/rust/example/scope/move/partial_move.html - [similar]
ドキュメンテーション - Rust By Example 日本語版 11838
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... /// あらゆる人物はここに代表されます。 pub struct Person { /// A person must have a name, no matter how muc ... /// 人物には名前が必要です。 name: String, } impl Person { /// Returns a person with the name given them // ... / 与えられた名前を持つpersonをを返します。 /// /// # Arguments /// /// * `name` ... - A string slice that holds the name of the person /// * `name` - `person`の名前を表す文字列のスライス ...
https://man.plustar.jp/rust/example/meta/doc.html - [similar]
Supertraits - Rust By Example 日本語版 8476
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ng a superset of another trait. For example: trait Person { fn name(&self) -> String; } // Person is a super ... // Implementing Student requires you to also impl Person. trait Student: Person { fn university(&self) -> S ...
https://man.plustar.jp/rust/example/trait/supertraits.html - [similar]
?によるOptionのアンパック - Rust By Example 日本語版 8368
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... で、リーダブルなコードを書くことができます。 struct Person { job: Option<Job>, } #[derive(Clone, Copy)] struc ... umber { area_code: Option<u8>, number: u32, } impl Person { // Gets the area code of the phone number of the ... person's job, if it exists. // その人の市外局番が存在する ... b?.phone_number?.area_code } } fn main() { let p = Person { job: Some(Job { phone_number: Some(PhoneNumber { ...
https://man.plustar.jp/rust/example/error/option_unwrap/question_mark.html - [similar]
バインディング - Rust By Example 日本語版 7862
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... { 15 } fn main() { println!("Tell me what type of person you are"); match age() { 0 => println!("I haven't ... マッチしなかった場合の処理 n => println!("I'm an old person of age {:?}", n), } } You can also use binding to ...
https://man.plustar.jp/rust/example/flow_control/match/binding.html - [similar]
構造体 - Rust By Example 日本語版 7808
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... リック型を扱う際に有効です。 #[derive(Debug)] struct Person { // The 'a defines a lifetime name: String, age: ... = String::from("Peter"); let age = 27; let peter = Person { name, age }; // Print debug struct // 構造体のデ ...
https://man.plustar.jp/rust/example/custom_types/structs.html - [similar]
デバッグ - Rust By Example 日本語版 7808
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 良いプリント」も提供します。 #[derive(Debug)] struct Person<'a> { name: &'a str, age: u8 } fn main() { let nam ... e = "Peter"; let age = 27; let peter = Person { name, age }; // Pretty print println!("{:#?}", p ...
https://man.plustar.jp/rust/example/hello/print/print_debug.html - [similar]
Rust By Example 日本語版 7681
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 良いプリント」も提供します。 #[derive(Debug)] struct Person<'a> { name: &'a str, age: u8 } fn main() { let nam ... e = "Peter"; let age = 27; let peter = Person { name, age }; // Pretty print println!("{:#?}", p ... リック型を扱う際に有効です。 #[derive(Debug)] struct Person { // The 'a defines a lifetime name: String, age: ... = String::from("Peter"); let age = 27; let peter = Person { name, age }; // Print debug struct // 構造体のデ ...
https://man.plustar.jp/rust/example/print.html - [similar]
PREV 1 NEXT