aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mingling/src/lib.rs')
-rw-r--r--mingling/src/lib.rs43
1 files changed, 33 insertions, 10 deletions
diff --git a/mingling/src/lib.rs b/mingling/src/lib.rs
index 4b3ced6..f5362d5 100644
--- a/mingling/src/lib.rs
+++ b/mingling/src/lib.rs
@@ -1,3 +1,8 @@
+#![doc(html_logo_url = "https://github.com/mingling-rs/mingling/raw/main/docs/res/icon3.png")]
+#![doc(
+ html_favicon_url = "https://github.com/mingling-rs/mingling/raw/main/docs/res/favicon_small.png"
+)]
+#![deny(missing_docs)]
#![doc = include_str!("lib.md")]
#[cfg(feature = "core")]
@@ -42,6 +47,8 @@ pub mod macros {
/// New Parser provided by the `picker` feature
#[cfg(feature = "picker")]
pub use arg_picker::macros::*;
+ /// `#[buffer]` - Wraps a unit-returning function to produce a `RenderResult`.
+ pub use mingling_macros::buffer;
/// `#[chain]` - Used to generate a struct implementing the `Chain` trait via a method
pub use mingling_macros::chain;
/// `#[completion(EntryType)]` - Used to generate completion entry
@@ -91,6 +98,12 @@ pub mod macros {
/// `#[program_setup]` - Used to generate program setup
#[cfg(feature = "extra_macros")]
pub use mingling_macros::program_setup;
+ /// `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;
#[doc(hidden)]
pub use mingling_macros::register_chain;
#[doc(hidden)]
@@ -106,6 +119,10 @@ pub mod macros {
/// `route! { /* ... */ }` - Used to generate a route that either returns a successful result or early returns an error.
#[cfg(feature = "extra_macros")]
pub use mingling_macros::route;
+ /// `#[routeify]` - An extension attribute macro that transforms `expr?` into `route!(expr)`.
+ /// Can be used standalone or as a chain/renderer extension: `#[chain(routeify, ...)]`.
+ #[cfg(feature = "extra_macros")]
+ pub use mingling_macros::routeify;
/// `suggest! { "hello", "bye" }` - Used to generate suggestions
#[cfg(feature = "comp")]
pub use mingling_macros::suggest;
@@ -118,17 +135,18 @@ pub mod macros {
#[cfg(feature = "macros")]
pub use mingling_macros::EnumTag;
-/// derive macro Groupped
+/// derive macro Grouped
#[cfg(feature = "macros")]
-pub use mingling_macros::Groupped;
+pub use mingling_macros::Grouped;
/// derive macro `StructuralData` — marks a type as supporting structured output
#[cfg(feature = "structural_renderer")]
pub use mingling_macros::StructuralData;
/// Example projects for `Mingling`, for learning how to use `Mingling`
-#[cfg(feature = "core")]
-pub mod _mingling_examples {
+#[cfg(all(feature = "core", feature = "docs_rs"))]
+#[allow(nonstandard_style)]
+pub mod EXAMPLES {
pub use crate::example_docs::*;
}
@@ -171,12 +189,15 @@ pub mod res;
/// use mingling::prelude::*;
/// ```
pub mod prelude {
- /// Re-export of the `Groupped` derive macro for grouping types.
+ /// Re-export of the `Grouped` trait
#[cfg(feature = "core")]
- pub use crate::Groupped;
+ pub use crate::Grouped;
/// Re-export of the `RenderResult` struct for outputting rendering result
#[cfg(feature = "core")]
pub use crate::RenderResult;
+ /// Re-export of the `Routable` trait
+ #[cfg(feature = "core")]
+ pub use crate::Routable;
/// Re-export of the `chain` macro for defining a chain of commands.
#[cfg(feature = "macros")]
pub use crate::macros::chain;
@@ -208,6 +229,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"))]
@@ -222,8 +249,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;
}