2 releases

0.1.1 May 1, 2020
0.1.0 Apr 30, 2020

#14 in #semantic-web

Download history 189/week @ 2021-08-09 257/week @ 2021-08-16 231/week @ 2021-08-23 150/week @ 2021-08-30 144/week @ 2021-09-06 184/week @ 2021-09-13 100/week @ 2021-09-20 225/week @ 2021-09-27 98/week @ 2021-10-04 131/week @ 2021-10-11 187/week @ 2021-10-18 97/week @ 2021-10-25 123/week @ 2021-11-01 85/week @ 2021-11-08 140/week @ 2021-11-15 103/week @ 2021-11-22

424 downloads per month
Used in 15 crates (3 directly)

CECILL-B

14KB
338 lines

MownStr: Maybe Owned String

This crate provides MownStr, a type for exchanging read-only strings that may be either borrowed or owned.

Contrarily to other types (such as for example Cow<str>), MownStr does not aim to be mutable nor generic, which allows it to be fast and lean.

Actually, a MownStr takes no more memory than a regular &str or Box<str>, and has a minimal runtime overhead. The drawback is that the maximum size of a MownStr is half the size of a regular str (which is still 8EiB on a 64-bit architectures...).


lib.rs:

MownStr is either a borrowed reference to a str or an own Box<str>.

No runtime deps

jǫ^