検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 36 for Debug (0.017 sec.)
デバッグ - Rust By Example 日本語版 12805
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... すが、他はすべて 手動で実装する必要があります。 fmt::Debug という トレイト はこれを簡略化します。 すべての 型 ... は fmt::Debug の実装を derive 、(すなわち自動で作成)することが ... rinted either with `fmt::Display` or // with `fmt::Debug`. // この構造体は`fmt::Display`、`fmt::Debug`のいず ... equired to make this `struct` printable with `fmt::Debug`. // `derive`アトリビュートは、 // この構造体を`fm ...
https://man.plustar.jp/rust/example/hello/print/print_debug.html - [similar]
ディスプレイ - Rust By Example 日本語版 11744
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... avy Ayu Rust By Example 日本語版 ディスプレイ fmt::Debug はコンパクトでクリーンであるようには見えませんね。 ... write!(f, "{}", self.0) } } } fmt::Display は fmt::Debug より綺麗かもしれませんが、 std ライブラリの場合は問 ... ているわけではありませんので、このような場合は fmt::Debug を使用するべきです。 ジェネリック でない コンテナ型 ... Import `fmt` // A structure holding two numbers. `Debug` will be derived so the results can // be contrast ...
https://man.plustar.jp/rust/example/hello/print/print_display.html - [similar]
ジェネリック境界 - Rust By Example 日本語版 11347
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト時のマーカー`{:?}`を実装するトレイト use std::fmt::Debug; trait HasArea { fn area(&self) -> f64; } impl Has ... f) -> f64 { self.length * self.height } } #[derive(Debug)] struct Rectangle { length: f64, height: f64 } #[ ... , height: f64 } // The generic `T` must implement `Debug`. Regardless // of the type, this will work proper ... ly. // ジェネリック型`T`は`Debug`トレイトを実装していなくてはならない。 // その限り ...
https://man.plustar.jp/rust/example/generics/bounds.html - [similar]
ライフタイム境界 - Rust By Example 日本語版 10666
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... e キーワードの後に注目してください。 use std::fmt::Debug; // Trait to bound with. // ライフタイムを紐付ける ... トレイト #[derive(Debug)] struct Ref<'a, T: 'a>(&'a T); // `Ref` contains ... ない。 // A generic function which prints using the `Debug` trait. // `Debug`トレイトを利用してプリントを行う ... ジェネリック関数 fn print<T>(t: T) where T: Debug { println!("`print`: t is {:?}", t); } // Here a r ...
https://man.plustar.jp/rust/example/scope/lifetime/lifetime_bounds.html - [similar]
Rust By Example 日本語版 10571
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... が決まります。 特に大事な形式は以下の2つです。 fmt::Debug : は、 {:?} というマーカーを使用し、デバッギング目 ... すが、他はすべて 手動で実装する必要があります。 fmt::Debug という トレイト はこれを簡略化します。 すべての 型 ... は fmt::Debug の実装を derive 、(すなわち自動で作成)することが ... rinted either with `fmt::Display` or // with `fmt::Debug`. // この構造体は`fmt::Display`、`fmt::Debug`のいず ...
https://man.plustar.jp/rust/example/print.html - [similar]
Where句 - Rust By Example 日本語版 9873
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... 構文より表現力が高い場合 があります。 use std::fmt::Debug; trait PrintInOption { fn print_in_option(self); } ... use we would otherwise have to express this as `T: Debug` or // use another method of indirect approach, th ... いない場合、以下と等価な機能を実装するには、 // `<T: Debug>`という形で表現するか、別の直接的でない方法 // を使 ... ない。 impl<T> PrintInOption for T where Option<T>: Debug { // We want `Option<T>: Debug` as our bound becau ...
https://man.plustar.jp/rust/example/generics/where.html - [similar]
複数のジェネリック境界 - Rust By Example 日本語版 9002
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... きは、通常時と同様、 , で区切ります。 use std::fmt::{Debug, Display}; fn compare_prints<T: Debug + Display>(t ... : &T) { println!("Debug: `{:?}`", t); println!("Display: `{}`", t); } fn c ... ompare_types<T: Debug, U: Debug>(t: &T, u: &U) { println!("t: `{:?}`", t ...
https://man.plustar.jp/rust/example/generics/multi_bounds.html - [similar]
継承(Derive) - Rust By Example 日本語版 8320
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... これは空っぽのインスタンスを作成するためのトレイト Debug , これは {:?} フォーマッタを利用して値をフォーマッ ... d // `Inches`はプリント可能なタプルになる #[derive(Debug)] struct Inches(i32); impl Inches { fn to_centimet ... conds` can't be printed; it doesn't implement the `Debug` trait // エラー: `Seconds`はプリントできない。これ ... は`Debug`トレイトを実装していないため //println!("One secon ...
https://man.plustar.jp/rust/example/trait/derive.html - [similar]
Combinators: map - Rust By Example 日本語版 8225
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ているのがわかります。 #![allow(dead_code)] #[derive(Debug)] enum Food { Apple, Carrot, Potato } #[derive(Deb ... ug)] struct Peeled(Food); #[derive(Debug)] struct Chopped(Food); #[derive(Debug)] struct Co ...
https://man.plustar.jp/rust/example/error/option_unwrap/map.html - [similar]
ハッシュ集合 - Rust By Example 日本語版 8225
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... (5); // If a collection's element type implements `Debug`, // then the collection implements `Debug`. // It ... the format `[elem1, elem2, ...]` // 集合の要素が、`Debug`を実装している型の場合、 // 集合そのものも`Debug`を ...
https://man.plustar.jp/rust/example/std/hash/hashset.html - [similar]
PREV 1 2 3 4 NEXT