slice-rc 0.2.1

A variety of reference-counted pointers with better support for slices than std::rc::Rc
Documentation
  • Coverage
  • 100%
    13 out of 13 items documented1 out of 7 items with examples
  • Size
  • Source code size: 202.51 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 8.34 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Aegrithas/slice-rc-rs
    1 1 0
  • 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 at https://docs.rs/slice-rc/ for more elaborate examples.