@@ -190,27 +190,6 @@ know, people`.
190190
191191このコードは、` 1 new tweet: horse_ebooks: of course, as you probably already know, people ` と出力します。
192192
193- <!--
194- Note that because we defined the `Summary` trait and the `NewsArticle` and
195- `Tweet` types in the same *lib.rs* in Listing 10-13, they’re all in the same
196- scope. Let’s say this *lib.rs* is for a crate we’ve called `aggregator` and
197- someone else wants to use our crate’s functionality to implement the `Summary`
198- trait on a struct defined within their library’s scope. They would need to
199- bring the trait into their scope first. They would do so by specifying `use
200- aggregator::Summary;`, which then would enable them to implement `Summary` for
201- their type. The `Summary` trait would also need to be a public trait for
202- another crate to implement it, which it is because we put the `pub` keyword
203- before `trait` in Listing 10-12.
204- -->
205-
206- リスト10-13で` Summary ` トレイトと` NewArticle ` 、` Tweet ` 型を同じ* lib.rs* に定義したので、
207- 全部同じスコープにあることに注目してください。この* lib.rs* を` aggregator ` と呼ばれるクレート専用にして、
208- 誰か他の人が私たちのクレートの機能を活用して自分のライブラリのスコープに定義された構造体に` Summary ` トレイトを実装したいとしましょう。
209- まず、トレイトをスコープに取り込む必要があるでしょう。` use aggregator::Summary; ` と指定してそれを行えば、
210- これにより、自分の型に` Summary ` を実装することが可能になるでしょう。` Summary ` トレイトは、
211- 他のクレートが実装するためには、公開トレイトである必要があり、ここでは、リスト10-12の` trait ` の前に、
212- ` pub ` キーワードを置いたのでそうなっています。
213-
214193<!--
215194Other crates that depend on the `aggregator` crate can also bring the `Summary`
216195trait into scope to implement `Summary` on their own types. One restriction to
0 commit comments