diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-20 09:50:28 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-20 09:50:28 +0800 |
| commit | c385dcf15930d2754b68c2794986ad30fc65c141 (patch) | |
| tree | 2fed45ade07d96d195b9f9a35a1de0aeda11ee5e /mingling/src/lib.rs | |
| parent | 7b3a1d7fd9f60b91a7f9602374c081882d46facc (diff) | |
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!`.
Diffstat (limited to 'mingling/src/lib.rs')
| -rw-r--r-- | mingling/src/lib.rs | 10 |
1 files changed, 6 insertions, 4 deletions
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; } |
