I'm using Boxed slices since all the configuration is immutable, and I think a Boxed slice is more efficient than a vector.
I didn't figure out how to store the profiles as const since some of the boxed slices have different numbers of elements, and obviously, arrays with different numbers of elements are different types.
I have multiple functions that request the configuration. The configuration profiles are simply defined inside a function that returns one of them, and it's obvious to me that this is super inefficient since every time a profile is requested, a lot of heap allocations are made and then dropped.
All functions that take pieces of the configuration accept a slice as an argument so elements in the configuration can be stored as any type of collection.
Could you please advise, is there a way to store it as a const?