1 unstable release
Uses old Rust 2015
0.1.0 | Jan 29, 2017 |
---|
#12 in #counted
3KB
rcstr
A reference counted string that acts like a regular str slice, hiding the fact that it is wrapped in Rc. Based on the rust compiler's RcStr
type used in the name interner table.
lib.rs
:
A reference counted string that acts like a regular str slice, hiding the
fact that it is wrapped in Rc
.
Example
use rcstr::RcStr;
use std::collections::HashSet;
let mut map: HashSet<RcStr> = HashSet::new();
map.insert(RcStr::new("foo"));
assert!(map.contains("foo"));
assert!(map.contains(&RcStr::new("foo")));
assert!(!map.contains("bar"));