| Crates.io | slice-rc |
| lib.rs | slice-rc |
| version | 0.2.1 |
| created_at | 2025-08-28 19:34:36.712965+00 |
| updated_at | 2025-08-28 20:59:49.440539+00 |
| description | A variety of reference-counted pointers with better support for slices than std::rc::Rc |
| homepage | |
| repository | https://github.com/Aegrithas/slice-rc-rs |
| max_upload_size | |
| id | 1814533 |
| size | 203,011 |
RcThis 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.