tokel_std/lib.rs
1#![forbid(
2 clippy::all,
3 clippy::perf,
4 clippy::nursery,
5 clippy::unwrap_used,
6 clippy::panic,
7 clippy::pedantic,
8 rustdoc::all,
9 unsafe_code
10)]
11//! # `tokel-std`
12//!
13//! `tokel-std` is a crate exposing a set of minimal, easily-composable transformer implementations that are deemed standard.
14//!
15//! ---
16//!
17//! *The following is the main `tokel` workspace documentation:*
18//!
19#![doc = include_str!("../README.md")]
20
21use tokel_engine::prelude::{Registry, Transformer};
22
23pub mod string;
24
25pub mod iter;
26
27pub mod structure;
28
29pub mod state;
30
31/// Register all the standard [`Transformer`] implementations
32///
33/// # Errors
34///
35/// This will fail if at least one standard [`Transformer`] is already present by-name in the [`Registry`].
36///
37/// On failure, there is no guarantee that other non-colliding transformers have not been registered.
38#[inline]
39pub fn register(registry: &mut Registry) -> Result<(), Box<dyn Transformer>> {
40 string::register(registry)?;
41
42 iter::register(registry)?;
43
44 structure::register(registry)?;
45
46 state::register(registry)?;
47
48 Ok(())
49}