Expand description
§rich-ext
Extensions layered on top of the faithful rich core, plus the internal
plugin registry. Anything that is not a faithful port of upstream rich
belongs here, so the core stays a clean, easily-synced mirror.
This crate carries its own independent SemVer (it does not track any upstream
version). See AGENTS.md → Versioning and docs/PLUGINS.md.
use rich::{Console, ColorSystem};
use rich_ext::ConsoleExt;
let mut console = Console::builder()
.force_terminal(true)
.color_system(Some(ColorSystem::Truecolor))
.build();
console.install_extensions(); // registers the number highlighter, etc.
let out = console.render_str_to_string("count=7");
assert!(out.contains("\x1b[1;36m7\x1b[0m"));Re-exports§
pub use highlighter::NumberHighlighter;pub use registry::install_defaults;pub use registry::ExtensionRegistry;pub use theme::extended_theme;pub use theme::EXTRA_STYLES;
Modules§
- cli
- Optional CLI conveniences, kept outside the faithful command parser.
- encoding
- Explicit text decoding for CLI and application inputs.
- highlighter
- Example extension: a number highlighter.
- registry
- The internal plugin registry.
- theme
- Extra named styles layered on the upstream theme.
Traits§
- Console
Ext - Ergonomic extension methods on the core
Console.