Lets assume we have an ink! smart contract
On a vanilla Mapping
alpha: Mapping<[u8;32], Astruct>
we can use
self.alpha.remove(&somehash)
My question is this: if we have the following mapping that takes a tuple
beta: Mapping<(String, [u8;20]) , Bstruct>
then we want to
self.beta.remove((&somestring, _))
Obviously the above does not and is not expected to work
Question: There are cases where for a given string in this case somestring
as seen above for any value of the 2nd element of the tuple, we want to remove storage.
We understand that we can store in a Vec the 2nd tuple element values and then loop using
self.beta.remove((&somestring, &a1))
...
self.beta.remove((&somestring, &a1000000))
but we have been wondering if there is a better method to maybe reset the above beta Mapping to the default removing all storage for a specific 1st tupple element value.
For example self.beta = Mapping::default();
would not be acceptable business logic
The concept of self.beta.remove((&somestring, _))
makes business logic sense but is not acceptable
Any suggestions please?