pub struct FunctionInfoRegistry { /* private fields */ }Expand description
Global registry providing access to all function documentation.
Uses static initialization with OnceLock for thread-safe singleton access. Provides efficient lookup by identifier and category.
Implementations§
Source§impl FunctionInfoRegistry
impl FunctionInfoRegistry
Sourcepub fn global() -> &'static Self
pub fn global() -> &'static Self
Get the global singleton instance.
Uses OnceLock for lazy initialization - first call builds the registry, subsequent calls return the cached instance.
Sourcepub fn get(&self, identifier: &str) -> Option<&FunctionCard>
pub fn get(&self, identifier: &str) -> Option<&FunctionCard>
Get function card by identifier.
Sourcepub fn get_required(&self, identifier: &str) -> Result<&FunctionCard, String>
pub fn get_required(&self, identifier: &str) -> Result<&FunctionCard, String>
Get function card by identifier with error handling.
Sourcepub fn by_category(&self, category: &str) -> Vec<&FunctionCard>
pub fn by_category(&self, category: &str) -> Vec<&FunctionCard>
Get all functions in a specific category.
Sourcepub fn categories(&self) -> Vec<&'static str>
pub fn categories(&self) -> Vec<&'static str>
Get all available categories.
Sourcepub fn search(&self, query: &str) -> Vec<&FunctionCard>
pub fn search(&self, query: &str) -> Vec<&FunctionCard>
Search functions by query string.
Sourcepub fn all_functions(&self) -> Vec<&FunctionCard>
pub fn all_functions(&self) -> Vec<&FunctionCard>
Get all functions.
Auto Trait Implementations§
impl Freeze for FunctionInfoRegistry
impl RefUnwindSafe for FunctionInfoRegistry
impl Send for FunctionInfoRegistry
impl Sync for FunctionInfoRegistry
impl Unpin for FunctionInfoRegistry
impl UnwindSafe for FunctionInfoRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more