Unnamed repository; edit this file 'description' to name the repository.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Newtypes for working with text sizes/ranges in a more type-safe manner.
//!
//! Minimal Supported Rust Version: latest stable.

#![forbid(unsafe_code)]
#![warn(missing_debug_implementations, missing_docs)]

mod range;
mod size;
mod traits;

#[cfg(feature = "serde")]
mod serde_impls;

pub use crate::{range::TextRange, size::TextSize, traits::TextLen};

#[cfg(target_pointer_width = "16")]
compile_error!("text-size assumes usize >= u32 and does not work on 16-bit targets");