async/await | Keywords used to write asynchronous code that is non-blocking and efficient. |
Attribute (`#[...]`) | Metadata applied to items like functions or structs to affect compilation or behavior. |
Borrowing | Accessing data without taking ownership, either immutably (&T ) or mutably (&mut T ). |
Box<T> | A smart pointer for heap allocation and ownership transfer. |
Cargo | Rust’s official build system and package manager. |
Clone | A trait for making deep copies of data. |
Crate | A compilation unit in Rust; can be a library or executable. |
Derive | Automatically implements traits using attributes like #[derive(Debug)] . |
Drop | A trait for customizing what happens when a value goes out of scope. |
Enum | A type that can be one of several defined variants, useful in pattern matching. |
Error Handling | Primarily done through Result<T, E> and panic! . |
Fat Pointer | A pointer with additional metadata (e.g., for slices or trait objects). |
Function Pointer | A reference to a function, e.g., fn() . |
Generics | Parametric types/functions using type parameters like <T> . |
HashMap | A key-value collection from std::collections . |
Heap | Memory allocated dynamically during runtime. |
impl | Defines method implementations or trait implementations for a type. |
IntoIterator | A trait used in for loops to produce iterators from a value. |
Lifetime ('a) | Specifies how long a reference is valid. |
Loop | An infinite loop construct, terminated using break . |
Macro | Metaprogramming feature used to generate code (e.g., macro_rules! ). |
Match | Pattern matching construct used for branching logic. |
Module (mod) | Namespace construct for organizing code. |
Ownership | Each value has a single owner responsible for its lifetime and cleanup. |
Pattern Matching | Used to destructure data using match , if let , or while let . |
Pointer | A reference to data, either safe (&T ) or raw (*const T ). |
Reference | A non-owning pointer to a value, subject to borrowing rules. |
Result<T, E> | Enum used to represent success (Ok ) or error (Err ) states. |
Shadowing | Rebinding a variable with a new value and possibly a new type. |
Slice | A view into a sequence of elements, e.g., &[T] . |
String | Growable, heap-allocated UTF-8 text. |
Struct | A custom type composed of named fields. |
Trait | A collection of method signatures that a type can implement. |
Trait Object | A dynamically dispatched instance of a trait, e.g., Box<dyn Trait> . |
Tuple | A fixed-size collection of values of various types, e.g., (i32, f64) . |
Unsafe | Marks code blocks that can bypass Rust’s safety checks. |
Vec<T> | A growable, heap-allocated array type. |
Variable Binding (let) | Declares variables; may be mutable with let mut . |
Zero-cost Abstractions | Rust abstractions incur no runtime overhead compared to equivalent low-level code. |