12 releases (7 breaking)
0.7.0 | Nov 2, 2020 |
---|---|
0.6.0 | Nov 1, 2020 |
0.5.1 | Oct 31, 2020 |
0.4.0 | Oct 28, 2020 |
0.0.0 | Oct 20, 2020 |
#8 in #interned
28 downloads per month
70KB
2K
SLoC
Global string intern pool
Internal use of DashMap for concurrent support
Examples
use pstr::IStr;
let s = IStr::new("hello world");
use pstr::MowStr;
let mut s = MowStr::new("hello");
assert!(s.is_interned());
s.push_str(" ");
assert!(s.is_mutable());
s.mutdown().push_str("world");
assert_eq!(s, "hello world");
s.intern();
assert!(s.is_interned());
lib.rs
:
Global string intern pool
Internal use of DashMap for concurrent support
Examples
use pstr::IStr;
let s = IStr::new("hello world");
use pstr::MowStr;
let mut s = MowStr::new("hello");
assert!(s.is_interned());
s.push_str(" ");
assert!(s.is_mutable());
s.mutdown().push_str("world");
assert_eq!(s, "hello world");
s.intern();
assert!(s.is_interned());
Dependencies
~395KB