aboutsummaryrefslogtreecommitdiff
path: root/mingling_core/src/renderer/structural/structural_data.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-26 06:27:16 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-26 06:41:01 +0800
commitd1a74ce57e5be72436376a829e9c7e1e7c1c561b (patch)
tree6ac923671fc09f1c47b613869d793ed3e04b91db /mingling_core/src/renderer/structural/structural_data.rs
parente735671acb3a81e1b7e334e56b9ef3963ba0c2fc (diff)
refactor(general_renderer): rename to structural_renderer
Diffstat (limited to 'mingling_core/src/renderer/structural/structural_data.rs')
-rw-r--r--mingling_core/src/renderer/structural/structural_data.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/mingling_core/src/renderer/structural/structural_data.rs b/mingling_core/src/renderer/structural/structural_data.rs
new file mode 100644
index 0000000..1cafac3
--- /dev/null
+++ b/mingling_core/src/renderer/structural/structural_data.rs
@@ -0,0 +1,15 @@
+use serde::Serialize;
+
+/// Marker trait for types that support structured output (JSON / YAML / TOML / RON).
+///
+/// This trait is a **supertrait** of `serde::Serialize` and is sealed via
+/// `__private::StructuralDataSealed`. It can only be implemented through:
+///
+/// - `#[derive(StructuralData)]`
+/// - `pack_structural!`
+/// - `group_structural!`
+///
+/// These entry points also register the type in the global `STRUCTURED_TYPES`
+/// registry, which is required for the `structural_render` match arm to be generated.
+#[doc(hidden)]
+pub trait StructuralData: Serialize + crate::__private::StructuralDataSealed {}