Toggle navigation
1.
Introduction
2.
Style
2.1.
Whitespace
2.2.
Comments
2.3.
Braces, semicolons, commas
2.4.
Naming
2.4.1.
Ownership variants
2.4.2.
Containers/wrappers
2.4.3.
Conversions
2.4.4.
Iterators
2.5.
Imports
2.6.
Organization
3.
Guidelines by Rust feature
3.1.
Let binding
3.2.
Pattern matching
3.3.
Loops
3.4.
Functions and methods
3.4.1.
Input
3.4.2.
Output
3.4.3.
For convenience
3.5.
Types
3.5.1.
Conversions
3.5.2.
The newtype pattern
3.6.
Traits
3.6.1.
For generics
3.6.2.
For objects
3.6.3.
For overloading
3.6.4.
For extensions
3.6.5.
For reuse
3.6.6.
Common traits
3.7.
Modules
3.8.
Crates
4.
Ownership and resources
4.1.
Constructors
4.2.
Builders
4.3.
Destructors
4.4.
RAII
4.5.
Cells and smart pointers
5.
Errors
5.1.
Signaling
5.2.
Handling
5.3.
Propagation
5.4.
Ergonomics
6.
Safety and guarantees
6.1.
Using unsafe
6.2.
Library guarantees
7.
Testing
7.1.
Unit testing
8.
FFI, platform-specific code
9.
APIs for a changing Rust
9.1.
Pre-1.0 changes
9.2.
Post-1.0 changes
9.3.
Timing unclear
Ownership and resource management
[FIXME]
Add general remarks about ownership/resources here.