systemprompt_runtime/
wellknown.rs1#[derive(Debug, Clone, Copy)]
5pub struct WellKnownMetadata {
6 pub path: &'static str,
7 pub name: &'static str,
8 pub description: &'static str,
9}
10
11inventory::collect!(WellKnownMetadata);
12
13impl WellKnownMetadata {
14 pub const fn new(path: &'static str, name: &'static str, description: &'static str) -> Self {
15 Self {
16 path,
17 name,
18 description,
19 }
20 }
21}
22
23pub fn get_wellknown_metadata(path: &str) -> Option<WellKnownMetadata> {
24 inventory::iter::<WellKnownMetadata>
25 .into_iter()
26 .find(|meta| meta.path == path)
27 .copied()
28}