Closed nferhat closed 5 months ago
UPDATE: That function get_registry_id
does not get the registry id, just a hashed form
I added RegistryKey::id()
method in this commit but note if you use Lua::replace_registry_value
the underlying key can be changed.
In next major release I'm planning to take &mut
instead when replacing values to better handle this.
Thank you very much, exactly what I needed!
I don't use replace_registry_value
, so changing registry ids should not be a concern (hopefully).
:+1:
Hi! Currently using this library to integrate configuration and scripting into my program.
Some of my usage has signals (basically callbacks run on specific events), storing them in:
Vec<RegistryKey>
(where the registry key points to a function in the lua state)If I want to remove a key, I don't want to rely on vector indexes in order to do so. A possible solution is to use
registry_id
to remove usingVec::retain
This property is private, one (hacky and bad) way to get it out is using:
A getter would be much appreciated.