検索
Results of 21 - 30 of about 193 for derive (0.062 sec.)
- 構造体 - Rust By Example 日本語版 5867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ライフタイム 15.4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオー...
ールドを持たず、ジェネリック型を扱う際に有効です。 #[derive(Debug)] struct Person { // The 'a defines a lifeti...
- https://man.plustar.jp/rust/example/custom_types/structs.html - [similar]
- エラー型を定義する - Rust By Example 日本語版 5867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ライフタイム 15.4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオー...
// その手前で何らかの処理を挟むことができます。 #[derive(Debug, Clone)] struct DoubleError; // Generation o...
- https://man.plustar.jp/rust/example/error/multiple_error_types/define_error_type... - [similar]
- ?の他の活用法 - Rust By Example 日本語版 5867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ライフタイム 15.4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオー...
= std::result::Result<T, Box<dyn error::Error>>; #[derive(Debug)] struct EmptyVec; impl fmt::Display for Emp...
- https://man.plustar.jp/rust/example/error/multiple_error_types/reenter_question_... - [similar]
- エラーをラップする - Rust By Example 日本語版 5867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ライフタイム 15.4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオー...
Result<T> = std::result::Result<T, DoubleError>; #[derive(Debug)] enum DoubleError { EmptyVec, // We will de...
- https://man.plustar.jp/rust/example/error/multiple_error_types/wrap_error.html - [similar]
- if let - Rust By Example 日本語版 5867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ライフタイム 15.4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオー...
even in cases where the enum doesn't implement or derive PartialEq . In such cases if Foo::Bar == a would f...
et : // This enum purposely neither implements nor derives PartialEq. // That is why comparing Foo::Bar == a...
- https://man.plustar.jp/rust/example/flow_control/if_let.html - [similar]
- ジェネリック境界 - Rust By Example 日本語版 5867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ライフタイム 15.4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオー...
ea(&self) -> f64 { self.length * self.height } } #[derive(Debug)] struct Rectangle { length: f64, height: f6...
- https://man.plustar.jp/rust/example/generics/bounds.html - [similar]
- フォーマット - Rust By Example 日本語版 5867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ライフタイム 15.4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオー...
elf.lat.abs(), lat_c, self.lon.abs(), lon_c) } } #[derive(Debug)] struct Color { red: u8, green: u8, blue: u...
- https://man.plustar.jp/rust/example/hello/print/fmt.html - [similar]
- タプル - Rust By Example 日本語版 5867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ライフタイム 15.4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオー...
ivity. // 以下の構造体は後ほど「演習」で用いる。 #[derive(Debug)] struct Matrix(f32, f32, f32, f32); fn main...
- https://man.plustar.jp/rust/example/primitives/tuples.html - [similar]
- ミュータビリティ - Rust By Example 日本語版 5867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ライフタイム 15.4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオー...
きますが書き込みはできません。 #[allow(dead_code)] #[derive(Clone, Copy)] struct Book { // `&'static str` is a...
- https://man.plustar.jp/rust/example/scope/borrow/mut.html - [similar]
- refパターン - Rust By Example 日本語版 5867
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
ライフタイム 15.4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオー...
下の例ではこれが有用になる例を幾つかお見せします。 #[derive(Clone, Copy)] struct Point { x: i32, y: i32 } fn m...
- https://man.plustar.jp/rust/example/scope/borrow/ref.html - [similar]