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