5 releases

0.0.5 Jul 19, 2020
0.0.4 Apr 9, 2020
0.0.3 Mar 1, 2020
0.0.2 Sep 16, 2019
0.0.1 Sep 12, 2019

#2750 in Parser implementations

Download history 34/week @ 2024-07-24 62/week @ 2024-07-31 66/week @ 2024-08-07 9/week @ 2024-08-14 2/week @ 2024-08-21 1/week @ 2024-08-28 4/week @ 2024-09-04 6/week @ 2024-09-11 9/week @ 2024-09-18 15/week @ 2024-09-25 33/week @ 2024-10-02 45/week @ 2024-10-09 42/week @ 2024-10-16 47/week @ 2024-10-23 71/week @ 2024-10-30 489/week @ 2024-11-06

668 downloads per month
Used in ouverture-ui

MIT license

21KB
440 lines

Copy String

&str on the stack. Gains Copy semantics.

Development Note

This crate is in its infancy. Right now it is more an 'act on my inspiration quickly' than a fully featured library.

Now with serde!

Rust Docs

Documentation is here.

Installation

Add to your Cargo.toml:

[dependencies]
copystr = "0.0.4"

Usage

Various fixed length strings are defined, s4, through to s32. Use TryFrom to convert a &str into a copy string. Alternatively, define your own custom lenght copy strings using the csstring macro.

To enable serde Serialize and Deserialize use the "serde" feature.

[dependencies]
copystr = { version = "0.0.4", features = [ "serde" ] }

lib.rs:

Copy String

Strings that exist on the stack. This makes them Copy. Useful for when you want to keep some small text inside a struct or enum and retain copy semantics. Strings are stored as a byte array with UTF8 conversion on the fly.

Dependencies

~165KB