Toptube Video Search Engine



Title:Use Arc Instead of Vec
Duration:15:21
Viewed:134,985
Published:13-06-2023
Source:Youtube

Rust lets you do efficient reference-counted strings and dynamic arrays using Arc basically just as easily as their owning (and deep-cloning) equivalents, String and Vec respectively. So why not use them as a reasonable default, until you actually need the mutability that String and Vec provide? Get into the weeds with me here, feat. some cool visualizations, with special guest appearance from Box. This video assumes some familiarity with Rust and its core smart pointer types, namely Vec/String/Rc/Arc/Box, along with data structures like HashMap and BTreeMap, and traits like Clone, Hash, Ord, and serde::{Serialize, Deserialize}. serde feature flag for Rc/Arc: https://serde.rs/feature-flags.html#-features-rc Arc docs: https://doc.rust-lang.org/std/sync/struct.Arc.html Vec docs: https://doc.rust-lang.org/std/vec/struct.Vec.html Smart pointers in Rust: https://www.youtube.com/watch?v=8O0Nt9qY_vo animations: https://www.manim.community/



SHARE TO YOUR FRIENDS


Download Server 1


DOWNLOAD MP4

Download Server 2


DOWNLOAD MP4

Alternative Download :