Rust Programming

  1. Generic Types, Traits, and Lifetimes
    1. Generic Types
      1. Generic Functions
        1. Type Parameters
          1. Generic Function Syntax
            1. Type Inference
            2. Generic Structs
              1. Generic Struct Definition
                1. Generic Field Types
                  1. Multiple Type Parameters
                  2. Generic Enums
                    1. Generic Enum Variants
                      1. Standard Generic Enums
                      2. Generic Methods
                        1. Implementation Blocks with Generics
                          1. Method-Specific Type Parameters
                          2. Monomorphization
                            1. Compile-Time Code Generation
                              1. Performance Implications
                            2. Traits
                              1. Trait Definition
                                1. Trait Syntax
                                  1. Method Signatures
                                    1. Associated Types
                                    2. Trait Implementation
                                      1. impl Trait for Type Syntax
                                        1. Orphan Rule
                                          1. Coherence Rules
                                          2. Default Implementations
                                            1. Default Method Bodies
                                              1. Overriding Defaults
                                              2. Trait Bounds
                                                1. Generic Type Constraints
                                                  1. Multiple Trait Bounds
                                                    1. where Clauses
                                                    2. Trait Objects
                                                      1. Dynamic Dispatch
                                                        1. Object Safety
                                                          1. dyn Keyword
                                                          2. Returning Traits
                                                            1. impl Trait Syntax
                                                              1. Boxed Trait Objects
                                                              2. Derive Macros
                                                                1. Standard Derivable Traits
                                                                  1. Custom Derive Macros
                                                                2. Lifetimes
                                                                  1. Lifetime Annotation Syntax
                                                                    1. Lifetime Parameters
                                                                      1. Lifetime Elision Rules
                                                                        1. Input Lifetime Elision
                                                                          1. Output Lifetime Elision
                                                                            1. Method Lifetime Elision
                                                                            2. Static Lifetime
                                                                              1. Lifetime Bounds
                                                                                1. Lifetime Subtyping
                                                                                  1. Generic Lifetimes in Structs
                                                                                    1. Generic Lifetimes in Methods