inline_flexstr/
lib.rs

1#![cfg_attr(not(feature = "std"), no_std)]
2#![cfg_attr(
3    all(
4        not(all(feature = "win_min_unsafe", target_family = "windows")),
5        feature = "safe"
6    ),
7    forbid(unsafe_code)
8)]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10#![warn(missing_docs)]
11
12//! A simple to use, copy/clone-efficient inline string type for Rust
13
14extern crate alloc;
15
16#[cfg(feature = "cstr")]
17#[doc = include_str!("../README.md")]
18mod readme_tests {}
19
20#[cfg(feature = "bytes")]
21/// Module for byte-based strings (`[u8]`)
22mod bytes;
23#[cfg(feature = "cstr")]
24/// Module for `CStr`-based strings
25mod cstr;
26/// Module for inline strings
27mod inline;
28#[cfg(all(feature = "std", feature = "osstr"))]
29/// Module for `OsStr`-based strings
30mod osstr;
31#[cfg(all(feature = "std", feature = "path"))]
32/// Module for `Path`-based strings
33mod path;
34#[cfg(feature = "str")]
35/// Module for `str`-based strings
36mod str;
37
38#[cfg(feature = "bytes")]
39pub use bytes::InlineBytes;
40#[cfg(feature = "cstr")]
41pub use cstr::{InlineCStr, TooLongOrNulError};
42#[cfg(feature = "cstr")]
43pub use flexstr_support::InteriorNulError;
44pub use flexstr_support::StringLike;
45#[cfg(all(feature = "std", feature = "osstr"))]
46pub use osstr::InlineOsStr;
47#[cfg(all(feature = "std", feature = "path"))]
48pub use path::InlinePath;
49#[cfg(feature = "str")]
50pub use str::{InlineStr, TooLongOrUtf8Error};
51
52pub use inline::{INLINE_CAPACITY, InlineFlexStr, TooLongForInlining};