Overview of standard library (std) types
masterThe Rust standard library (std) provides several custom types that extend the functionality of basic primitives. Key types include:
- Growable Strings: e.g.,
String(for text like"hello world") - Growable Vectors: e.g.,
Vec<T>(for collections like[1, 2, 3]) - Optional Types:
Option<T>(used for values that may or may not be present) - Error Handling Types:
Result<T, E>(used for operations that can succeed or fail) - Heap Allocated Pointers:
Box<T>(for managing data on the heap)