Skip to content

Commit b43fc64

Browse files
committed
ci: generate pages at 41547be [ci skip]
1 parent 41547be commit b43fc64

9 files changed

Lines changed: 1622 additions & 932 deletions

docs/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -149,42 +149,41 @@ <h1 class="menu-title">The Rust Programming Language 日本語版</h1>
149149
-->
150150
<h1 id="肥大化していくプロジェクトをパッケージクレートモジュールを利用して管理する"><a class="header" href="#肥大化していくプロジェクトをパッケージクレートモジュールを利用して管理する">肥大化していくプロジェクトをパッケージ、クレート、モジュールを利用して管理する</a></h1>
151151
<!--
152-
As you write large programs, organizing your code will be important because
153-
keeping track of your entire program in your head will become impossible. By
154-
grouping related functionality and separating code with distinct features,
155-
you’ll clarify where to find code that implements a particular feature and
156-
where to go to change how a feature works.
152+
As you write large programs, organizing your code will become increasingly
153+
important. By grouping related functionality and separating code with distinct
154+
features, you’ll clarify where to find code that implements a particular
155+
feature and where to go to change how a feature works.
157156
-->
158-
<p>大きなプログラムを書く時、そのすべてを頭の中に入れておくのは不可能になるため、コードのまとまりを良くすることが重要になります
157+
<p>書いているプログラムが大きいときほど、コードを整理しておくことはますます重要になります
159158
関係した機能をまとめ、異なる特徴を持つコードを分割することにより、特定の機能を実装しているコードを見つけたり、機能を変更したりするためにどこを探せば良いのかを明確にできます。</p>
160159
<!--
161160
The programs we’ve written so far have been in one module in one file. As a
162-
project grows, you can organize code by splitting it into multiple modules and
163-
then multiple files. A package can contain multiple binary crates and
161+
project grows, you should organize code by splitting it into multiple modules
162+
and then multiple files. A package can contain multiple binary crates and
164163
optionally one library crate. As a package grows, you can extract parts into
165164
separate crates that become external dependencies. This chapter covers all
166-
these techniques. For very large projects of a set of interrelated packages
167-
that evolve together, Cargo provides workspaces, which we’ll cover in the
168-
[“Cargo Workspaces”][workspaces] section in Chapter 14.
165+
these techniques. For very large projects comprising a set of interrelated
166+
packages that evolve together, Cargo provides *workspaces*, which we’ll cover
167+
in the [“Cargo Workspaces”][workspaces] section in Chapter 14.
169168
-->
170169
<p>私達がこれまでに書いてきたプログラムは、一つのファイル内の一つのモジュール内にありました。
171-
プロジェクトが大きくなるにつれて、これを複数のモジュールに、ついで複数のファイルに分割することで、プログラムを整理することができます
170+
プロジェクトが大きくなるにつれて、これを複数のモジュールに、ついで複数のファイルに分割することで、プログラムを整理するべきです
172171
パッケージは複数のバイナリクレートからなり、またライブラリクレートを1つもつこともできます。
173172
パッケージが大きくなるにつれて、その一部を抜き出して分離したクレートにし、外部依存とするのもよいでしょう。
174173
この章ではそれらのテクニックすべてを学びます。
175174
相互に関係し合い、同時に成長するパッケージの集まりからなる巨大なプロジェクトには、
176-
Cargoがワークスペースという機能を提供します。これは14章の<a href="ch14-03-cargo-workspaces.html">Cargoワークスペース</a><!-- ignore -->で解説します。</p>
175+
Cargoが<em>ワークスペース</em>という機能を提供します。これは14章の<a href="ch14-03-cargo-workspaces.html">Cargoワークスペース</a>で解説します。</p>
177176
<!--
178-
In addition to grouping functionality, encapsulating implementation details
179-
lets you reuse code at a higher level: once you’ve implemented an operation,
180-
other code can call that code via the code’s public interface without knowing
181-
how the implementation works. The way you write code defines which parts are
182-
public for other code to use and which parts are private implementation details
183-
that you reserve the right to change. This is another way to limit the amount
184-
of detail you have to keep in your head.
177+
We’ll also discuss encapsulating implementation details, which lets you reuse
178+
code at a higher level: once you’ve implemented an operation, other code can
179+
call your code via its public interface without having to know how the
180+
implementation works. The way you write code defines which parts are public for
181+
other code to use and which parts are private implementation details that you
182+
reserve the right to change. This is another way to limit the amount of detail
183+
you have to keep in your head.
185184
-->
186-
<p>機能をグループにまとめられることに加え、実装の詳細がカプセル化されることにより、コードをより高いレベルで再利用できるようになります:
187-
手続きを実装し終えてしまえば、他のコードはそのコードの公開されたインターフェースを通じて、実装の詳細を知ることなくそのコードを呼び出すことができるのです
185+
<p>実装の詳細をカプセル化することについても議論します。カプセル化によって、コードをより高いレベルで再利用できるようになります:
186+
手続きを実装し終えてしまえば、他のコードはその公開されたインターフェースを通じて、実装の詳細を知る必要なくそのコードを呼び出すことができるのです
188187
コードをどう書くかによって、どの部分が他のコードにも使える公開のものになるのか、それとも自分だけが変更できる非公開のものになるのかが決定されます。
189188
これもまた、記憶しておくべき細部を制限してくれる方法のひとつです。</p>
190189
<!--

0 commit comments

Comments
 (0)