mappable-rc 0.1.1

Provides mappable reference counted types
Documentation
  • Coverage
  • 86.67%
    13 out of 15 items documented1 out of 15 items with examples
  • Size
  • Source code size: 32.77 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.69 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • JakobDegen/mappable-rc
    12 1 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JakobDegen

Provides mappable Rc and Arc types.

use mappable_rc::Mrc;

let m: Mrc<[u32]> = vec![1, 2, 3, 4].into();
assert_eq!(m.as_ref(), &[1, 2, 3, 4]);

let m: Mrc<[u32]> = Mrc::map(m, |slice| &slice[1..=2]);
assert_eq!(m.as_ref(), &[2, 3]);