pub struct MetadataManager { /* private fields */ }Expand description
High-performance metadata manager
Implementations§
Source§impl MetadataManager
impl MetadataManager
Sourcepub fn add_source(&self, source: MetadataSource)
pub fn add_source(&self, source: MetadataSource)
Add a metadata source
Sourcepub async fn fetch_all(&self) -> Result<FetchStats>
pub async fn fetch_all(&self) -> Result<FetchStats>
Fetch all metadata from configured sources
Sourcepub fn get_exact(&self, name: &str) -> Option<Arc<Function>>
pub fn get_exact(&self, name: &str) -> Option<Arc<Function>>
Get function by exact name (case-insensitive)
Sourcepub fn get_prefix(&self, text: &str) -> Option<(String, Arc<Function>)>
pub fn get_prefix(&self, text: &str) -> Option<(String, Arc<Function>)>
Get function by prefix match
Sourcepub fn get(&self, name: &str) -> Option<Arc<Function>>
pub fn get(&self, name: &str) -> Option<Arc<Function>>
Get function (tries exact first, then prefix)
Sourcepub fn get_with_match(&self, name: &str) -> Option<(String, Arc<Function>)>
pub fn get_with_match(&self, name: &str) -> Option<(String, Arc<Function>)>
Get function with match info (for compatibility)
Sourcepub fn all_functions(&self) -> Vec<Arc<Function>>
pub fn all_functions(&self) -> Vec<Arc<Function>>
Get all functions
Sourcepub fn all_events(&self) -> Vec<Event>
pub fn all_events(&self) -> Vec<Event>
Get all events
Sourcepub fn function_count(&self) -> usize
pub fn function_count(&self) -> usize
Get function count
Sourcepub fn enum_count(&self) -> usize
pub fn enum_count(&self) -> usize
Get enum count
Sourcepub fn event_count(&self) -> usize
pub fn event_count(&self) -> usize
Get event count
Source§impl MetadataManager
impl MetadataManager
Sourcepub fn export_cache(&self) -> MetadataCache
pub fn export_cache(&self) -> MetadataCache
Export metadata to cache
Sourcepub fn import_cache(&self, cache: MetadataCache) -> Result<()>
pub fn import_cache(&self, cache: MetadataCache) -> Result<()>
Import metadata from cache
Sourcepub fn cache_to_json(&self) -> Result<String>
pub fn cache_to_json(&self) -> Result<String>
Serialize cache to JSON
Sourcepub fn cache_from_json(&self, json: &str) -> Result<()>
pub fn cache_from_json(&self, json: &str) -> Result<()>
Deserialize cache from JSON
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MetadataManager
impl !RefUnwindSafe for MetadataManager
impl Send for MetadataManager
impl Sync for MetadataManager
impl Unpin for MetadataManager
impl UnsafeUnpin for MetadataManager
impl !UnwindSafe for MetadataManager
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