MCPcopy Create free account
hub / github.com/PerroEngine/Perro / find_doc

Function find_doc

perro_website/src/docs.rs:73–78  ·  view source on GitHub ↗
(collection: &str, slug: &str)

Source from the content-addressed store, hash-verified

71 "api_map" => 14,
72 _ => usize::MAX,
73 }
74}
75
76pub fn find_doc(collection: &str, slug: &str) -> Option<&'static DocPage> {
77 let normalized = slug.trim_matches('/');
78 docs()
79 .iter()
80 .find(|doc| doc.collection == collection && doc.slug == normalized)
81 .or_else(|| {

Callers 4

og_textFunction · 0.85
DocPageViewFunction · 0.85
BookChapterPageFunction · 0.85

Calls 3

docsFunction · 0.85
findMethod · 0.80
iterMethod · 0.45