Crates.io | borrow-owned |
lib.rs | borrow-owned |
version | 0.1.0 |
source | src |
created_at | 2021-06-21 16:44:41.170461 |
updated_at | 2021-06-21 16:44:41.170461 |
description | Simple helper for temporary object moving |
homepage | |
repository | https://github.com/operutka/borrow-owned |
max_upload_size | |
id | 412989 |
size | 10,272 |
It is useful if you need to pass your object somewhere and you cannot pass
a reference to the object because you wouldn't be able to guarantee that
the object lives long enough. For example, you don't want to use
Arc<Mutex<_>>
for some reason but you need to pass your object to a new
thread and you need to use the object again in the original thread once the
new thread does not need the object anymore.