microstring/lib.rs
1//! Small, niche-able, stack allocated strings.
2//!
3//! ```
4//! # use microstring::*;
5//! const CURRENCY: NanoString = NanoString::new("GBP").unwrap();
6//! ```
7//!
8//! ```compile_fail
9//! # use microstring::*;
10//! const TOO_BIG: NanoString = NanoString::new("GEEBEEPEE").unwrap();
11//! ```
12//!
13//! ```
14//! # use microstring::*;
15//! # use std::mem::size_of;
16//! assert_eq! {
17//! size_of::<NanoString>(),
18//! size_of::<Option<NanoString>>(),
19//! }
20//! ```
21
22#![no_std]
23
24#[cfg(feature = "alloc")]
25extern crate alloc;
26#[cfg(feature = "std")]
27extern crate std;
28
29mod generated;
30pub use generated::*;