Skip to main content

reliakit_primitives/
lib.rs

1//! Type-safe primitives for constrained values.
2//!
3//! `reliakit-primitives` provides small owned wrapper types for values that
4//! should satisfy common constraints before they move through an application or
5//! library boundary.
6//!
7//! The crate has no dependencies and forbids unsafe code.
8
9#![cfg_attr(not(feature = "std"), no_std)]
10#![forbid(unsafe_code)]
11
12extern crate alloc;
13
14pub mod bounded;
15pub mod collections;
16pub mod duration;
17pub mod error;
18pub mod non_empty;
19pub mod numeric;
20pub mod semver;
21pub mod text;
22pub mod uuid;
23
24pub use bounded::BoundedStr;
25pub use collections::NonEmptyVec;
26pub use duration::HumanDuration;
27pub use error::{PrimitiveError, PrimitiveResult};
28pub use non_empty::NonEmptyStr;
29pub use numeric::{ByteSize, Percent, PercentageF64, Port, PositiveFloat, PositiveInt};
30pub use semver::SemVer;
31pub use text::{Email, HexString, HttpUrl, Slug};
32pub use uuid::Uuid;