Vec

We'll cover the following...

Arrays offer a fixed-size collection of values on the stack. Slices allow you to talk about any collection of values, regardless of where they’re stored or how many of them there are. What if we want to have a dynamic size? Just like we need a special struct String to hold heap-allocated strings, we need a special struct, Vec, to hold heap-allocated collections of arbitrary data.

I already bored you to death with the UTF-8 talk above. I’ll say this one much quicker, a String is a thin wrapper around a ...