Rust has an interesting crate for this, arc-swap [1].
It's essentially just an atomic pointer that can be swapped out.
[1] https://docs.rs/arc-swap/latest/arc_swap/