token_string/
lib.rs

1// SPDX-FileCopyrightText: Copyright (C) 2024 Roland Csaszar
2// SPDX-License-Identifier: MPL-2.0
3//
4// Project:  token-string
5// File:     lib.rs
6// Date:     16.Nov.2024
7// =============================================================================
8#![doc = include_str!("../README.md")]
9//!
10// This is needed for `cargo doc` to get the formatting right.
11//! ---
12//! The documentation of the string itself is at [`TokenString`].
13//!
14//! To concatenate strings there is a [`Builder`] and the convenience macro
15//! [`crate::concat`].
16
17#![no_std]
18#![feature(doc_cfg)]
19#![cfg_attr(feature = "pattern", feature(pattern))]
20
21mod builder;
22mod error;
23mod string;
24mod string_ptr;
25
26// Exports.
27pub use builder::{Builder, BuilderIter, Collect, Concat};
28pub use error::TkStrError;
29pub use string::{
30	EMPTY,
31	MAX_LENGTH,
32	MAX_LENGTH_SMALL,
33	TokenString,
34	TokenStringIter,
35	TokenStringIterOwn,
36};
37// Internal use
38pub(crate) use string::{MAX_LENGTH_SMALL_ADD1, PREFIX_LENGTH};
39pub(crate) use string_ptr::StringPtr;