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