7 releases

0.3.0 Oct 2, 2024
0.2.1 Feb 13, 2023
0.1.3 Dec 20, 2021
0.1.1 May 1, 2020
0.1.0 Apr 30, 2020

#1378 in Web programming

Download history 282/week @ 2024-07-02 821/week @ 2024-07-09 1294/week @ 2024-07-16 2803/week @ 2024-07-23 1913/week @ 2024-07-30 1319/week @ 2024-08-06 1325/week @ 2024-08-13 1101/week @ 2024-08-20 1105/week @ 2024-08-27 1068/week @ 2024-09-03 678/week @ 2024-09-10 754/week @ 2024-09-17 618/week @ 2024-09-24 659/week @ 2024-10-01 619/week @ 2024-10-08 450/week @ 2024-10-15

2,414 downloads per month
Used in 38 crates (2 directly)

CECILL-B

18KB
407 lines

MownStr: Maybe Owned String

Latest Version Documentation Actions Status

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...).

Supported Rust version

This crate targets the stable channel of rustc and cargo. I do not aim for compatibility with older versions, so new releases of mownstr may require you to upgrade your Rust toolchain.

No runtime deps