Skip to main content

non_empty_str/
lib.rs

1//! Non-empty strings.
2
3#![deny(missing_docs)]
4#![cfg_attr(not(feature = "std"), no_std)]
5#![cfg_attr(docsrs, feature(doc_cfg))]
6
7#[cfg(feature = "alloc")]
8extern crate alloc;
9
10#[macro_use]
11pub mod macros;
12
13pub mod str;
14
15pub mod iter;
16
17#[doc(inline)]
18pub use str::{EmptyStr, FromNonEmptyStr, MaybeEmptyUtf8Error, NonEmptyStr, NonEmptyUtf8Error};
19
20cfg_select! {
21    any(feature = "std", feature = "alloc") => {
22        pub mod boxed;
23        pub mod cow;
24        pub mod string;
25
26        #[doc(inline)]
27        pub use boxed::{EmptyBoxedStr, NonEmptyBoxedStr};
28
29        #[doc(inline)]
30        pub use cow::NonEmptyCowStr;
31
32        #[doc(inline)]
33        pub use string::{
34            EmptyString, FromMaybeEmptyUtf8Error, FromNonEmptyUtf8Error, NonEmptyString
35        };
36    }
37    _ => {}
38}
39
40pub(crate) mod cmp;
41
42#[cfg(feature = "ownership")]
43pub(crate) mod ownership;
44
45#[cfg(feature = "serde")]
46pub(crate) mod serde;
47
48pub(crate) mod internals;