検索

phrase: max: clip:
target: order:
Results of 21 - 30 of about 58 for struct (0.012 sec.)
?によるOptionのアンパック - Rust By Example 日本語版 7421
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 使うことで、リーダブルなコードを書くことができます。 struct Person { job: Option<Job>, } #[derive(Clone, Copy) ... ] struct Job { phone_number: Option<PhoneNumber>, } #[deriv ... e(Clone, Copy)] struct PhoneNumber { area_code: Option<u8>, number: u32, ...
https://man.plustar.jp/rust/example/error/option_unwrap/question_mark.html - [similar]
key型の変種 - Rust By Example 日本語版 7421
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... トレイトを実装する方法の詳細については触れません。 struct を HashMap で扱う際の例として、とてもシンプルなユー ... する必要があります。 #[derive(PartialEq, Eq, Hash)] struct Account<'a>{ username: &'a str, password: &'a str, ... } struct AccountInfo<'a>{ name: &'a str, email: &'a str, } ...
https://man.plustar.jp/rust/example/std/hash/alt_key_types.html - [similar]
関数 - Rust By Example 日本語版 7318
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... び出しの構文は fun::<A, B, ...>() のようになります。 struct A; // Concrete type `A`. // 具象型`A`. struct S(A) ... ; // Concrete type `S`. // 具象型`S`. struct SGen<T>(T); // Generic type `SGen`. // ジェネリック ...
https://man.plustar.jp/rust/example/generics/gen_fn.html - [similar]
ジェネリクス - Rust By Example 日本語版 7318
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... しょう。 // A concrete type `A`. // `A`という具象型 struct A; // In defining the type `Single`, the first use ... A`自身も具象型であるため、`Single`は具象型となる。 struct Single(A); // ^ Here is `Single`s first use of the ... るため、 // 上で定義した`A`を受け取ることもできる。 struct SingleGen<T>(T); fn main() { // `Single` is concre ...
https://man.plustar.jp/rust/example/generics.html - [similar]
Traits - Rust By Example 日本語版 7113
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... at impl may have annotation of lifetimes too. // A struct with annotation of lifetimes. #[derive(Debug)] str ...
https://man.plustar.jp/rust/example/scope/lifetime/trait.html - [similar]
FromおよびInto - Rust By Example 日本語版 6908
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 行えます。 use std::convert::From; #[derive(Debug)] struct Number { value: i32, } impl From<i32> for Number { ... オフです。 use std::convert::From; #[derive(Debug)] struct Number { value: i32, } impl From<i32> for Number { ...
https://man.plustar.jp/rust/example/conversion/from_into.html - [similar]
フォーマット - Rust By Example 日本語版 6908
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... されます。 use std::fmt::{self, Formatter, Display}; struct City { name: &'static str, // Latitude // 緯度 lat ... lat_c, self.lon.abs(), lon_c) } } #[derive(Debug)] struct Color { red: u8, green: u8, blue: u8, } fn main() ...
https://man.plustar.jp/rust/example/hello/print/fmt.html - [similar]
ドキュメンテーション - Rust By Example 日本語版 6908
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ed here /// あらゆる人物はここに代表されます。 pub struct Person { /// A person must have a name, no matter ... r; /// bar docs mod bar { /// the docs for Bar pub struct Bar; } no_inline Used to prevent linking out to se ...
https://man.plustar.jp/rust/example/meta/doc.html - [similar]
タプル - Rust By Example 日本語版 6908
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ean) = pair; (boolean, integer) } // The following struct is for the activity. // 以下の構造体は後ほど「演習 ... 」で用いる。 #[derive(Debug)] struct Matrix(f32, f32, f32, f32); fn main() { // A tuple ... just an integer: {:?}", (5u32)); //tuples can be destructured to create bindings //タプルを分解して別の変数に ...
https://man.plustar.jp/rust/example/primitives/tuples.html - [similar]
refパターン - Rust By Example 日本語版 6908
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... なる例を幾つかお見せします。 #[derive(Clone, Copy)] struct Point { x: i32, y: i32 } fn main() { let c = 'Q'; ... oint { x: 0, y: 0 }; // `ref` is also valid when destructuring a struct. // `ref`は構造体をデストラクトする際 ... mut mutable_tuple = (Box::new(5u32), 3u32); { // Destructure `mutable_tuple` to change the value of `last`. ...
https://man.plustar.jp/rust/example/scope/borrow/ref.html - [similar]
PREV 1 2 3 4 5 6 NEXT