From c385dcf15930d2754b68c2794986ad30fc65c141 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 20 Jul 2026 09:50:28 +0800 Subject: docs: migrate renderer examples to buffer macro and update docs Update all documentation and code examples to use the new `#[renderer(buffer)]` pattern with `r_println!` instead of manually constructing `RenderResult` with `writeln!`. --- mingling/src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mingling/src') diff --git a/mingling/src/lib.rs b/mingling/src/lib.rs index d1691fb..b6c9a5a 100644 --- a/mingling/src/lib.rs +++ b/mingling/src/lib.rs @@ -223,6 +223,12 @@ pub mod prelude { /// Like `pack!` but also marks the type for structured output #[cfg(all(feature = "macros", feature = "structural_renderer"))] pub use mingling_macros::pack_structural; + /// `r_print!` - Prints text to a `RenderResult` buffer (without newline). + /// See the macro documentation for implicit vs. explicit buffer usage. + pub use mingling_macros::r_print; + /// `r_println!` - Prints text to a `RenderResult` buffer (with newline). + /// See the macro documentation for implicit vs. explicit buffer usage. + pub use mingling_macros::r_println; /// Re-export of the `completion` macro for generating completion entries. #[cfg(all(feature = "macros", feature = "comp"))] @@ -237,8 +243,4 @@ pub mod prelude { #[cfg(feature = "picker")] pub use crate::picker::EntryPicker; - - /// Used to enable the `writeln!` macro for `RenderResult` - #[cfg(feature = "core")] - pub use std::io::Write; } -- cgit