1.
Introduction
1.1.
Translations
2.
Idioms
2.1.
Use borrowed types for arguments
2.2.
Concatenating Strings with format!
2.3.
Constructor
2.4.
The Default Trait
2.5.
Collections Are Smart Pointers
2.6.
Finalisation in Destructors
2.7.
mem::{take(_), replace(_)}
2.8.
On-Stack Dynamic Dispatch
2.9.
Foreign function interface (FFI)
2.9.1.
Idiomatic Errors
2.9.2.
Accepting Strings
2.9.3.
Passing Strings
2.10.
Iterating over an Option
2.11.
Pass Variables to Closure
2.12.
Privacy For Extensibility
2.13.
Easy doc initialization
2.14.
Temporary mutability
3.
Design Patterns
3.1.
Behavioural
3.1.1.
Command
3.1.2.
Interpreter
3.1.3.
Newtype
3.1.4.
RAII Guards
3.1.5.
Strategy
3.1.6.
Visitor
3.2.
Creational
3.2.1.
Builder
3.2.2.
Fold
3.3.
Structural
3.3.1.
Compose Structs
3.3.2.
Prefer Small Crates
3.3.3.
Contain unsafety in small modules
3.4.
Foreign function interface (FFI)
3.4.1.
Object-Based APIs
3.4.2.
Type Consolidation into Wrappers
4.
Anti-patterns
4.1.
Clone to satisfy the borrow checker
4.2.
#[deny(warnings)]
4.3.
Deref Polymorphism
5.
Functional Programming
5.1.
Programming paradigms
5.2.
Generics as Type Classes
6.
Additional Resources
6.1.
Design principles
Light
Rust (default)
Coal
Navy
Ayu
Rust Design Patterns
Translations
简体中文
한국어
다른 언어로 된 번역본을 이 페이지에 추가하고 싶다면,
원본 레포지터리
에 이슈를 생성해주세요.