UsefulLinks
Computer Science
Programming
By Language
Rust Programming
1. Getting Started with Rust
2. Rust Fundamentals
3. Understanding Ownership
4. Structuring Data with Structs
5. Enums and Pattern Matching
6. Managing Growing Projects
7. Common Collections
8. Error Handling
9. Generic Types, Traits, and Lifetimes
10. Writing Automated Tests
11. Functional Programming Features
12. Smart Pointers
13. Fearless Concurrency
14. Advanced Features
15. Foreign Function Interface
16. Rust Patterns and Best Practices
9.
Generic Types, Traits, and Lifetimes
9.1.
Generic Types
9.1.1.
Generic Functions
9.1.1.1.
Type Parameters
9.1.1.2.
Generic Function Syntax
9.1.1.3.
Type Inference
9.1.2.
Generic Structs
9.1.2.1.
Generic Struct Definition
9.1.2.2.
Generic Field Types
9.1.2.3.
Multiple Type Parameters
9.1.3.
Generic Enums
9.1.3.1.
Generic Enum Variants
9.1.3.2.
Standard Generic Enums
9.1.4.
Generic Methods
9.1.4.1.
Implementation Blocks with Generics
9.1.4.2.
Method-Specific Type Parameters
9.1.5.
Monomorphization
9.1.5.1.
Compile-Time Code Generation
9.1.5.2.
Performance Implications
9.2.
Traits
9.2.1.
Trait Definition
9.2.1.1.
Trait Syntax
9.2.1.2.
Method Signatures
9.2.1.3.
Associated Types
9.2.2.
Trait Implementation
9.2.2.1.
impl Trait for Type Syntax
9.2.2.2.
Orphan Rule
9.2.2.3.
Coherence Rules
9.2.3.
Default Implementations
9.2.3.1.
Default Method Bodies
9.2.3.2.
Overriding Defaults
9.2.4.
Trait Bounds
9.2.4.1.
Generic Type Constraints
9.2.4.2.
Multiple Trait Bounds
9.2.4.3.
where Clauses
9.2.5.
Trait Objects
9.2.5.1.
Dynamic Dispatch
9.2.5.2.
Object Safety
9.2.5.3.
dyn Keyword
9.2.6.
Returning Traits
9.2.6.1.
impl Trait Syntax
9.2.6.2.
Boxed Trait Objects
9.2.7.
Derive Macros
9.2.7.1.
Standard Derivable Traits
9.2.7.2.
Custom Derive Macros
9.3.
Lifetimes
9.3.1.
Lifetime Annotation Syntax
9.3.2.
Lifetime Parameters
9.3.3.
Lifetime Elision Rules
9.3.3.1.
Input Lifetime Elision
9.3.3.2.
Output Lifetime Elision
9.3.3.3.
Method Lifetime Elision
9.3.4.
Static Lifetime
9.3.5.
Lifetime Bounds
9.3.6.
Lifetime Subtyping
9.3.7.
Generic Lifetimes in Structs
9.3.8.
Generic Lifetimes in Methods
Previous
8. Error Handling
Go to top
Next
10. Writing Automated Tests