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