Working with Data Groups
- Vector (
Vec<T>): A dynamic array that can grow in size. Stored on the heap. - String: A collection of bytes that can be modified. Unlike
&str, it owns its data. - HashMap<K, V>: Stores mapping of keys to values. Great for quick lookups (e.g., looking up a balance for a public key).
Safety Warning
Always check if a key exists in a HashMap before accessing it to avoid panics in high-security environments.