slice-rc 0.1.0

A variety of reference-counted with better support for slices than std::rc::Rc
Documentation
  • Coverage
  • 100%
    12 out of 12 items documented1 out of 6 items with examples
  • Size
  • Source code size: 203.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 8.3 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Aegrithas

Slice Rc

This crate provides a variation of reference-counted pointer that allows sub-slices to also contribute to the reference counter. A basic example of that different:

use slice_rc::Src;

fn main() {
  let hello_world: Src<str> = Src::new("Hello World!");
  let world: Src<str> = hello_world.slice(6..11);
  
  assert_eq!(hello_world, "Hello World!");
  assert_eq!(world, "World");
}

See the documentation for more elaborate examples.