rust vector add code example Example: get length of vector rust let a = vec![1, 2, 3]; assert_eq!(a.len(), 3);