Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Use the Rust Vec Type for Dynamically Expanding Arrays

via

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

Reviews

Start your review of Use the Rust Vec Type for Dynamically Expanding Arrays

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.