I really need to temporarily cast
Any so I'm able to later on cast it back to
T<'a> again (well, actually
'b which must be outlived by
'a. Unfortunately as things are right now
Any has an artificial limitation of requiring
I think I've figured out a way to use
transmute to cheat the system, yet put a wrapper around the whole thing to enforce safety. Unfortunately my lifetime-fu is way too weak to have confidence in the whole thing.
The code in question:
I also wonder if there are existing libraries that would provide this in a more generic way, and is it even possible and/or worthwhile.