Add more methods to BTreeMap
Motivation
I am currently implementing the ic-stable-structures in Juno and I whish following methods would have been available as they are in the standard BTreeMap.
Note
None are blocker as they can be solved using iter() and other operator.
List
WIP: I'll update the list according my progress. Here are those already known:
keys()&into_keys()values()&into_values()into_iter()(?)
The difference between foo() and into_foo() is that the former returns a reference while the latter returns a full copy of the data. In our case, since data is being read from stable storage, it cannot be returned as a reference, so our iter(), for example, is the equivalent of into_iter() in the standard library.
key() and values() would be nice. In the meantime, you can extract that information from the iter(), but I agree it's good to add more consistency with the standard library.