borrow-count 0.1.0

Memory that can be shared with a smart pointer and then reaquired with a future.
Documentation
  • Coverage
  • 0%
    0 out of 37 items documented0 out of 36 items with examples
  • Size
  • Source code size: 26.07 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.44 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 25s Average build duration of successful builds.
  • all releases: 25s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Vi-Kitten/borrow-count
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Vi-Kitten

Borrow Count

Memory that can be shared with a smart pointer and then reaquired with a future.

Example

let unique = Unique::new(0);
let (host, mut share) = unique.share_mut();
tokio::task::spawn(async move {
    tokio::time::sleep(std::time::Duration::from_millis(16)).await;
    *share += 1;
});
let unique = host.await;
assert_eq!(unique.into_inner(), 1)