When I wanted to find The Best Way(tm) to map u64 to i64 and then back to u64, I found this thread, which indicates that as can be used for 1-to-1 bit mappings of same-size integers.
Today someone linked a thread about as-for-lossy-casts deprecation, which indicates that as may be deprecated for such use-cases in the future.
Is there a way to perform u64 <-> i64 bit-for-bit conversions today which is guaranteed not to add conversion overhead (i.e. no {over,under}flow checks), and that is low-to-no risk of being deprecated in the future?
XY: My app uses u64 but stores them in a database that takes in and returns i64.