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