|
3 | 3 | An open source book about design patterns and idioms in the Rust programming |
4 | 4 | language that you can read [here](https://rust-unofficial.github.io/patterns/). |
5 | 5 |
|
6 | | -## TODOs |
7 | | - |
8 | | -### Idioms |
9 | | - |
10 | | -* TODO stability for extensibility |
11 | | -* TODO trait to separate visibility of methods from visibility of data (<https://github.com/sfackler/rust-postgres/blob/v0.9.6/src/lib.rs#L1400>) |
12 | | -* TODO leak amplification ("Vec::drain sets the Vec's len to 0 prematurely so that mem::forgetting Drain "only" mem::forgets more stuff. instead of exposing uninitialized memory or having to update the len on every iteration") |
13 | | -* TODO interior mutability - UnsafeCell, Cell, RefCell |
14 | | - |
15 | | -### Design patterns |
16 | | - |
17 | | -* TODO iterators (to safely avoid bounds checks) |
18 | | -* TODO closures and lifetimes (coupling to lifetime) |
19 | | -* TODO platform-specific sub-modules (<https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md#platform-specific-opt-in>) |
20 | | -* TODO Module organisation (by looking at examples such as Rusts `libstd`, and how it integrated into the Rusts source code, lessons can be learned about ergonomic project management and API design. Closely assosciated with platform-specific sub-modules) |
21 | | -* [Entry API](patterns/entry.md) (Currently just a boilerplate) |
22 | | -* TODO extension traits |
23 | | -* TODO destructor bombs (ensure linear typing dynamically, e.g., <https://github.com/Munksgaard/session-types/commit/0f25ccb7c3bc9f65fa8eaf538233e8fe344a189a>) |
24 | | -* TODO convertible to Foo trait for more generic generics (e.g., <http://static.rust-lang.org/doc/master/std/fs/struct.File.html#method.open>) |
25 | | -* [Late bound bounds](patterns/late-bounds.md) (Currently just a boilerplate) |
26 | | -* TODO 'shadow' borrowed version of struct - e.g., double buffering, Niko's parser generator |
27 | | -* TODO composition of structs to please the borrow checker |
28 | | -* TODO `Error` traits and `Result` forwarding |
29 | | -* TODO graphs |
30 | | - |
31 | | -### Anti-patterns |
32 | | - |
33 | | -* TODO thread + catch_panic for exceptions |
34 | | -* TODO Clone to satisfy the borrow checker |
35 | | -* TODO Matching all fields of a struct (back compat) |
36 | | -* TODO wildcard matches |
37 | | -* TODO taking an enum rather than having multiple functions |
38 | | -* TODO `unwrap()`ing every `Result` instead of forwarding it |
39 | | - |
40 | 6 | ## Contributing |
41 | 7 |
|
42 | 8 | You are missing content in this repository that can be helpful for others and you are eager to explain it? |
43 | 9 | Awesome! We are always happy about new contributions (e.g. elaboration or corrections on certain topics) to this project. |
44 | 10 |
|
45 | | -We suggest reading our [Contribution guide](./CONTRIBUTING.md) to get more information on how it works. |
| 11 | +You can check the [Umbrella issue](https://github.com/rust-unofficial/patterns/issues/116) for all the patterns, anti-patterns, and idioms that could be added. |
| 12 | + |
| 13 | +We suggest reading our [Contribution guide](./CONTRIBUTING.md) to get more information on how contributing to this repository works. |
46 | 14 |
|
47 | 15 | ## Building with mdbook |
48 | 16 |
|
|
0 commit comments