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.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/mingling/src/lib.rs b/mingling/src/lib.rs
index 70b69bc..4c49f15 100644
--- a/mingling/src/lib.rs
+++ b/mingling/src/lib.rs
@@ -96,15 +96,24 @@ pub mod macros {
/// Used to register an external type as a group member
#[cfg(feature = "extra_macros")]
pub use mingling_macros::group;
+ /// Like `group!` but also marks the type for structured output
+ #[cfg(all(feature = "general_renderer", feature = "extra_macros"))]
+ pub use mingling_macros::group_structural;
/// Used to generate a struct implementing the `HelpRequest` trait via a method
pub use mingling_macros::help;
/// Used to create a `Node` struct via a literal
pub use mingling_macros::node;
/// Used to create a wrapper type for use with `Chain` and `Renderer`
pub use mingling_macros::pack;
+ /// Like `pack!` but also marks the type for structured output
+ #[cfg(feature = "general_renderer")]
+ pub use mingling_macros::pack_structural;
/// Used to create an error struct with automatic `name` field
#[cfg(feature = "extra_macros")]
pub use mingling_macros::pack_err;
+ /// Like `pack_err!` but also marks the type for structured output
+ #[cfg(all(feature = "general_renderer", feature = "extra_macros"))]
+ pub use mingling_macros::pack_err_structural;
#[cfg(feature = "comp")]
#[doc(hidden)]
pub use mingling_macros::program_comp_gen;
@@ -148,6 +157,10 @@ pub use mingling_macros::EnumTag;
/// derive macro Groupped
pub use mingling_macros::Groupped;
+/// derive macro `StructuralData` — marks a type as supporting structured output
+#[cfg(feature = "general_renderer")]
+pub use mingling_macros::StructuralData;
+
/// Example projects for `Mingling`, for learning how to use `Mingling`
pub mod _mingling_examples {
pub use crate::example_docs::*;
@@ -200,9 +213,15 @@ pub mod prelude {
pub use crate::macros::gen_program;
/// Re-export of the `pack` macro for creating wrapper types.
pub use crate::macros::pack;
+ /// Like `pack!` but also marks the type for structured output
+ #[cfg(feature = "general_renderer")]
+ pub use mingling_macros::pack_structural;
/// Re-export of the `pack_err` macro for creating error types.
#[cfg(feature = "extra_macros")]
pub use crate::macros::pack_err;
+ /// Like `pack_err!` but also marks the type for structured output
+ #[cfg(all(feature = "general_renderer", feature = "extra_macros"))]
+ pub use mingling_macros::pack_err_structural;
/// Re-export of the `r_print` macro for printing within a renderer context.
pub use crate::macros::r_print;
/// Re-export of the `r_println` macro for printing with a newline within a renderer