That is: a thread-unsafe (e.g. !Send) equivalent to ArcStr. std::rc::Rc would be to RcStr as std::sync::Arc is to ArcStr). It would avoid needing to use atomic operations, but otherwise would support the same features.
This would probably take either a bunch of copy/pasted code, or a big refactor. Neither is exactly ideal, but I've wanted a Rc version of this a few times.
I'm not sure if this would be better as a separate crate. (Ideally not, as it would allow sharing code, but this might take renaming the arcstr::literal! macro, and honestly the arcstr name implies, well, Arc-equivalence, so the name is a bit weird).
That is: a thread-unsafe (e.g.
!Send
) equivalent toArcStr
.std::rc::Rc
would be toRcStr
asstd::sync::Arc
is toArcStr
). It would avoid needing to use atomic operations, but otherwise would support the same features.This would probably take either a bunch of copy/pasted code, or a big refactor. Neither is exactly ideal, but I've wanted a
Rc
version of this a few times.I'm not sure if this would be better as a separate crate. (Ideally not, as it would allow sharing code, but this might take renaming the
arcstr::literal!
macro, and honestly thearcstr
name implies, well,Arc
-equivalence, so the name is a bit weird).