slice-rc 0.2.1

A variety of reference-counted pointers with better support for slices than std::rc::Rc
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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:

```rust
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/](https://docs.rs/slice_rc) for more elaborate examples.