RcVec based on Rc and can be converted from Rc without allocation,
just like Box is converted to Vec
Due to Rc's API, this implementation cannot use realloc, resulting in some performance issues
Similar to Vec::into_boxed_slice,
RcVec::into_uniq_slice can be converted to UniqRc,
which is the packaging of Rc and behaves similarly to Box
Examples
use RcVec;
use Rc;
let rc: = new;
let rcptr = as_ptr.cast;
let mut vec = from;
assert_eq!;
assert_eq!;
assert!;
vec.push;
assert_eq!;
assert!;
assert!;
assert_eq!;
Safety
- miri passed
I have not checked any synchronization related issues with the Arc variant