Closed vedantroy closed 3 years ago
The macro was never intended to support more than what the static
keyword supports on its own.
Eg this is invalid as well:
static (FOO, BAR): (u8, u8) = (1, 2);
What you are describing should be solvable just via privacy though, by ensuring __DB__
is private to the module that defines it.
Feel free to re-open otherwise. :)
Would it be possible for the macro to support the following?
I have the following use-case. Right now, I'm opening 3 different "trees/keyspaces" in Sled. I want to prevent people from using the default keyspace, which is accessible through
__DB__
. Essentially, I want__DB__
to be hidden/private. A tuple could solve this.Current code
Proposed code:
Update: Guessing this wouldn't work anyway because
db
would be dropped by the end of the scope, not sure.