You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
simonsan c2b307fa9b
Fixing links (#129)
4 years ago
.github/workflows Add doc tests to CI (#124) 4 years ago
anti_patterns Added information on --cap-lints to deny-warnings antipattern (#58) 4 years ago
functional Add introductions (#117) 4 years ago
idioms Add doc tests to CI (#124) 4 years ago
patterns Add doc tests to CI (#124) 4 years ago
refactoring Add introductions (#117) 4 years ago
.env Adding mdbook configuration and deployment to gh-pages (#111) 4 years ago
.gitignore Adding mdbook configuration and deployment to gh-pages (#111) 4 years ago
CONTRIBUTING.md Adding Contribution guide (#123) 4 years ago
LICENSE Initial commit 9 years ago
README.md Fix typo in filename (#127) 4 years ago
SUMMARY.md Adding Nick Camerons talk at PDXRust 2016 to additional resources section (#102) 4 years ago
additional_resources.md Adding Nick Camerons talk at PDXRust 2016 to additional resources section (#102) 4 years ago
book.toml Adding mdbook configuration and deployment to gh-pages (#111) 4 years ago
intro.md Fixing links (#129) 4 years ago
template.md Adding Contribution guide (#123) 4 years ago

README.md

Rust Design Patterns

An open source book about design patterns and idioms in the Rust programming language that you can read here.

Contents

Introduction

Idioms

Design patterns

Anti-patterns

  • TODO thread + catch_panic for exceptions
  • TODO Clone to satisfy the borrow checker
  • Deref polymorphism
  • TODO Matching all fields of a struct (back compat)
  • TODO wildcard matches
  • TODO taking an enum rather than having multiple functions
  • TODO unwrap()ing every Result instead of forwarding it
  • #[deny(warnings)]

Contributing

You are missing content in this repository that can be helpful for others and you are eager to explain it? Awesome! We are always happy about new contributions (e.g. elaboration or corrections on certain topics) to this project.

We suggest reading our Contribution guide to get more information on how it works.

Building with mdbook

This book is built with mdbook. You can install it by running cargo install mdbook.

If you want to build it locally you can run one of these two commands in the root directory of the repository:

  • mdbook build

    Builds static html pages as output and place them in the /book directory by default.

  • mdbook serve

    Serves the book at http://localhost:3000 (port is changeable, take a look at the terminal output to be sure) and reloads the browser when a change occurs.

License

This content of this repository is licensed under MPL-2.0; see LICENSE.