From 4588e17f7ddacd8391a5c881a209735e08d48797 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 4 Aug 2026 13:26:48 +0800 Subject: feat: add entry metadata system with compile-time typed values Add `Metadata` trait and `#[metadata(Entry)]` attribute macro to attach arbitrary, compile-time-typed metadata to entries. Implement `ProgramCollect::get_metadata()` for runtime retrieval, backed by a global registry populated by `register_metadata!`. Extend `pathf` with `MetadataPattern` to resolve metadata types across modules at build time. Add two examples demonstrating metadata usage with and without pathf integration. --- mingling_pathf/src/patterns.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mingling_pathf/src/patterns.rs') diff --git a/mingling_pathf/src/patterns.rs b/mingling_pathf/src/patterns.rs index 964fe7c..fcc50c3 100644 --- a/mingling_pathf/src/patterns.rs +++ b/mingling_pathf/src/patterns.rs @@ -9,6 +9,7 @@ pub use dispatcher_clap::*; pub use group::*; pub use grouped_derive::*; pub use help::*; +pub use metadata::*; pub use pack::*; pub use renderer::*; @@ -21,5 +22,6 @@ mod dispatcher_clap; mod group; mod grouped_derive; mod help; +mod metadata; mod pack; mod renderer; -- cgit