Go to file
Nick Cameron e54514d35d Merge pull request #13 from liigo/patch-1
fix compile error in comment
2015-10-28 09:08:25 -04:00
idioms fix compile error in comment 2015-10-28 09:04:38 +08:00
patterns Merge pull request #14 from liigo/patch-2 2015-10-27 08:43:49 -04:00
intro.md Initial commit 2015-08-31 10:06:10 +12:00
LICENSE Initial commit 2015-08-31 10:06:10 +12:00
README.md Result + try! is a pattern, unwrap() is not 2015-10-27 10:07:01 +01:00
template.md Added a few idioms and patterns - some are still WIP 2015-10-23 09:53:16 +13:00

Rust Design Patterns

An open source repository of design patterns and idioms in the Rust programming language.

Contents

Introduction

Idioms

Design patterns

Anti-patterns

  • TODO thread + catch_panic for exceptions
  • TODO Clone to satisfy the borrow checker
  • TODO 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

Contributing

Contributions are very welcome!

You should start with the template. Copy it into the appropriate directory, edit it, and submit a PR. You might not want every section, and you might want to add extra sections.

Correction and elaboration PRs are very welcome.