cprint/
lib.rs

1#![allow(path_statements)]
2//! **Cargo-like printing**
3//!
4//! Easily print beautiful formatted messages like Cargo does.
5//!
6//! ## Examples
7//! ```rust
8//! use cprint::{cprint, Color};
9//!
10//! cprint!("Using cprint crate!");
11//! ```
12//!
13//! ## Coloration
14//! For all signatures, you can specify the color of the title with a predefined color from the [`colored::Color`] enum or with RGB values `(r, g, b)`.
15//! To specify the color use `=>` at the end of the strings.
16//!
17//! ## Macros
18//! - [`cprint!`] and [`cprintln!`] for printing to stdout.
19//! - [`ceprint!`] and [`ceprintln!`] for printing to stderr.
20//! - [`cformat!`] for formatting a string.
21
22pub use colored::Color;
23
24pub use coloration::Coloration;
25
26#[doc(hidden)]
27pub mod coloration;
28
29#[cfg(feature = "cprint")]
30mod cprint;
31
32#[cfg(feature = "ceprint")]
33mod ceprint;
34
35#[cfg(feature = "cformat")]
36mod cformat;
37
38#[cfg(any(feature = "cprint", feature = "ceprint", feature = "cformat"))]
39mod utils;