Kixiron / lasso

A fast, concurrent string interner
Apache License 2.0
137 stars 20 forks source link

Support non-str values in a Rodeo #32

Open CraftSpider opened 2 years ago

CraftSpider commented 2 years ago

Adds a new public trait, Internable, which is by default implemented for str, OsStr, Path, and [u8]. This is a noticeably breaking change, due to the addition of a V generic on most things, as well as regressions for a couple type-inference locations.

I can add in #26 now if desired, as this seems a good time to make that change, if breaking inference anyways.

fixes #23

Kixiron commented 2 years ago

I did some work on this in my internable branch and I've got a few issues:

In my branch I pretty much just give up on the first two problems, I use OsStr::to_str().unwrap() and only implement Serialize/Deserialize for Rodeo<K, str, S> but I'm not a fan of either "solution"