8 karma · joined Jun 3, 2022 (4y ago) · 2 submissions
comment 4y ago · link · parent
If you are using async rust, and want to borrow data, use an Arc<T>.
In fact, if you ever use tokio::spawn, you will have to use Arc<T> anyway because it requires 'static lifetime.