Overview
Explore the Rust Vec type for dynamically-sized arrays in this 45-minute video tutorial. Learn how to use the vec! macro for instantiation, add items with .push(), join Vecs using .append(), remove items with .remove(), and manage memory with .reserve(). Discover methods like .len() and .capacity() for monitoring Vec size and capacity. Gain practical knowledge through examples of creating vectors, indexing, working with custom data types, and manipulating vector contents. Access additional resources including the Rust Vec Type Reference and official documentation to deepen your understanding of this essential Rust data structure.
Syllabus
Introduction
Rust Programming Tutorial Playlist
Working with Vectors
Creating a Vector
Testing the Vector
Indexing the Vector
Indexing a Range
Instantiating Vec from a String
Creating a Custom Data Type
Running the Code
Append Items from Second Vec
Append Method
Append Example
Insert Example
BTOP
Taught by
Trevor Sullivan