Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Commit 5f0bf5c

Browse files
authored
Merge pull request #1022 from kelseasy/master
fix(faq): link to rust-book builder pattern
2 parents 18d75eb + 3cb17dd commit 5f0bf5c

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

de-DE/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ Kommt darauf an. Es _gibt_ Möglichkeiten, um objektorientierte Konzepte wie [Me
12351235
Wie kann ich einen Struct mit optionalen Parametern konfigurieren?
12361236
</a></h3>
12371237

1238-
Die einfachste Möglichkeit ist es, den Typ [`Option`][Option] als Parameter für Funktionen wie `new` zu verwenden. Alternativ kannst du das [Builder Pattern](https://aturon.github.io/ownership/builders.html) implementieren, mit dem einzelne Attribute durch Funktionsaufrufe an einen Builder belegt werden, bevor der eigentliche Struct konstruiert wird.
1238+
Die einfachste Möglichkeit ist es, den Typ [`Option`][Option] als Parameter für Funktionen wie `new` zu verwenden. Alternativ kannst du das [Builder Pattern](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern) implementieren, mit dem einzelne Attribute durch Funktionsaufrufe an einen Builder belegt werden, bevor der eigentliche Struct konstruiert wird.
12391239

12401240
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
12411241
Wie benutze ich globale Variablen in Rust?

en-US/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ That depends. There _are_ ways of translating object-oriented concepts like [mul
12351235
How do I handle configuration of a struct with optional parameters?
12361236
</a></h3>
12371237

1238-
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://aturon.github.io/ownership/builders.html), where only certain functions instantiating member variables must be called before the construction of the built type.
1238+
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern), where only certain functions instantiating member variables must be called before the construction of the built type.
12391239

12401240
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
12411241
How do I do global variables in Rust?

es-ES/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ That depends. There _are_ ways of translating object-oriented concepts like [mul
12291229
How do I handle configuration of a struct with optional parameters?
12301230
</a></h3>
12311231

1232-
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://aturon.github.io/ownership/builders.html), where only certain functions instantiating member variables must be called before the construction of the built type.
1232+
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern), where only certain functions instantiating member variables must be called before the construction of the built type.
12331233

12341234
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
12351235
How do I do global variables in Rust?

fr-FR/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ That depends. There _are_ ways of translating object-oriented concepts like [mul
12291229
How do I handle configuration of a struct with optional parameters?
12301230
</a></h3>
12311231

1232-
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://aturon.github.io/ownership/builders.html), where only certain functions instantiating member variables must be called before the construction of the built type.
1232+
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern), where only certain functions instantiating member variables must be called before the construction of the built type.
12331233

12341234
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
12351235
How do I do global variables in Rust?

id-ID/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ That depends. There _are_ ways of translating object-oriented concepts like [mul
12361236
How do I handle configuration of a struct with optional parameters?
12371237
</a></h3>
12381238

1239-
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://aturon.github.io/ownership/builders.html), where only certain functions instantiating member variables must be called before the construction of the built type.
1239+
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern), where only certain functions instantiating member variables must be called before the construction of the built type.
12401240

12411241
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
12421242
How do I do global variables in Rust?

it-IT/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ Come gestisco la configurazione di una `struct` con parametri opzionali?
14221422
</a></h3>
14231423

14241424
Il modo più semplice è utilizzare il tipo [`Option`][Option] in qualsiasi funzione venga utilizzata per costruire istanze della struttura (generalmente `new()`).
1425-
Un altro modo è utilizzare il [metodo del costruttore](https://aturon.github.io/ownership/builders.html), dove alcune funzioni devono essere chiamate dopo la costruzione del tipo.
1425+
Un altro modo è utilizzare il [metodo del costruttore](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern), dove alcune funzioni devono essere chiamate dopo la costruzione del tipo.
14261426

14271427
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
14281428
Come faccio le variabili globali in Rust?

ja-JP/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ That depends. There _are_ ways of translating object-oriented concepts like [mul
12481248
How do I handle configuration of a struct with optional parameters?
12491249
</a></h3>
12501250

1251-
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://aturon.github.io/ownership/builders.html), where only certain functions instantiating member variables must be called before the construction of the built type.
1251+
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern), where only certain functions instantiating member variables must be called before the construction of the built type.
12521252

12531253
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
12541254
How do I do global variables in Rust?

ko-KR/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ Rust는 여러 패러다임을 지원합니다.
14531453
</a></h3>
14541454

14551455
가장 쉬운 방법은 구조체 인스턴스를 생성하는 어떤 함수에든 (보통 `new()`에) [`Option`][Option] 타입을 쓰는 겁니다.
1456-
또 다른 방법은 [빌더(builder) 패턴](https://aturon.github.io/ownership/builders.html)을 써서, 타입을 생성하기 전에 멤버 변수를 인스턴스화하는 특정 함수들을 호출해야 하도록 하는 것입니다.
1456+
또 다른 방법은 [빌더(builder) 패턴](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern)을 써서, 타입을 생성하기 전에 멤버 변수를 인스턴스화하는 특정 함수들을 호출해야 하도록 하는 것입니다.
14571457

14581458
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
14591459
Rust에서 전역 변수를 쓰려면 어떻게 하죠?

pt-BR/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ That depends. There _are_ ways of translating object-oriented concepts like [mul
12291229
How do I handle configuration of a struct with optional parameters?
12301230
</a></h3>
12311231

1232-
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://aturon.github.io/ownership/builders.html), where only certain functions instantiating member variables must be called before the construction of the built type.
1232+
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern), where only certain functions instantiating member variables must be called before the construction of the built type.
12331233

12341234
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
12351235
How do I do global variables in Rust?

sv-SE/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ That depends. There _are_ ways of translating object-oriented concepts like [mul
12351235
How do I handle configuration of a struct with optional parameters?
12361236
</a></h3>
12371237

1238-
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://aturon.github.io/ownership/builders.html), where only certain functions instantiating member variables must be called before the construction of the built type.
1238+
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern), where only certain functions instantiating member variables must be called before the construction of the built type.
12391239

12401240
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
12411241
How do I do global variables in Rust?

vi-VN/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ That depends. There _are_ ways of translating object-oriented concepts like [mul
12291229
How do I handle configuration of a struct with optional parameters?
12301230
</a></h3>
12311231

1232-
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://aturon.github.io/ownership/builders.html), where only certain functions instantiating member variables must be called before the construction of the built type.
1232+
The easiest way is to use the [`Option`][Option] type in whatever function you're using to construct instances of the struct (usually `new()`). Another way is to use the [builder pattern](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern), where only certain functions instantiating member variables must be called before the construction of the built type.
12331233

12341234
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
12351235
How do I do global variables in Rust?

zh-CN/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ Rust 是面向对象吗?
12161216
如何处理有可选参数的结构体的配置?
12171217
</a></h3>
12181218

1219-
最简单的方法是在你用来构造结构体实现的任何函数( 通常是 `new`)中使用 [`Option`][Option] 类型。另一种方法是使用 [构造器模式](https://aturon.github.io/ownership/builders.html),在构造类型之前,一些明确实例化成员变量的函数必须被调用。
1219+
最简单的方法是在你用来构造结构体实现的任何函数( 通常是 `new`)中使用 [`Option`][Option] 类型。另一种方法是使用 [构造器模式](https://doc.rust-lang.org/stable/book/first-edition/method-syntax.html#builder-pattern),在构造类型之前,一些明确实例化成员变量的函数必须被调用。
12201220

12211221
<h3><a href="#how-do-i-do-global-variables" name="how-do-i-do-global-variables">
12221222
如何在 Rust 中做全局对象?

0 commit comments

Comments
 (0)