Rust - Arrays and Vectors
In Rust, there are different ways to store a collection of values. The most common types for such collections are arrays and vectors (Vec), each having distinct characteristics and use cases.
Blog topic
Rust ist eine systemnahe Programmiersprache, die Speicher- und Datensicherheit ohne Garbage Collection bietet und gleichzeitig hohe Performance ermöglicht.
Articles
In Rust, there are different ways to store a collection of values. The most common types for such collections are arrays and vectors (Vec), each having distinct characteristics and use cases.
Borrowing is one of the central concepts in Rust's memory model and is closely linked to the ownership system. Instead of moving or copying data, data can be borrowed, enabling safe and efficient memory management.
Rust offers two main string types, &str and String, each optimized for different requirements.
In Rust, the unit type (()) is a special type used in many situations where no specific value is needed.
Rust has the concept of boxing, which enables storing values on the heap instead of the stack. Boxing in Rust is represented by the type Box<T>, which wraps a value of type T in a box object and manages the memory dynamically on the heap. This is particularly useful when the size of the type is not known at compile time or with recursive data types.