pub struct HybridRegistry { /* private fields */ }Expand description
Combined local and remote registry client
Implementations§
Source§impl HybridRegistry
impl HybridRegistry
Sourcepub fn local_only(local: LocalRegistry) -> Self
pub fn local_only(local: LocalRegistry) -> Self
Create hybrid registry with only local
Sourcepub fn with_remote(local: LocalRegistry, remote: RemoteRegistry) -> Self
pub fn with_remote(local: LocalRegistry, remote: RemoteRegistry) -> Self
Create hybrid registry with both local and remote
Sourcepub fn set_local_first(self, local_first: bool) -> Self
pub fn set_local_first(self, local_first: bool) -> Self
Set search priority (true: local first, false: remote first)
Sourcepub fn search(
&mut self,
query: &str,
limit: usize,
) -> Result<Vec<PluginRegistryEntry>>
pub fn search( &mut self, query: &str, limit: usize, ) -> Result<Vec<PluginRegistryEntry>>
Search for plugin in registry (local first by default)
Sourcepub fn get(
&mut self,
name: &str,
version: Option<&str>,
) -> Result<PluginRegistryEntry>
pub fn get( &mut self, name: &str, version: Option<&str>, ) -> Result<PluginRegistryEntry>
Get plugin from registry
Sourcepub fn register_local(&mut self, entry: PluginRegistryEntry) -> Result<()>
pub fn register_local(&mut self, entry: PluginRegistryEntry) -> Result<()>
Register plugin in local registry
Sourcepub fn local_registry(&self) -> &LocalRegistry
pub fn local_registry(&self) -> &LocalRegistry
Get local registry reference
Sourcepub fn sync_from_remote(&mut self, plugins: Vec<&str>) -> Result<usize>
pub fn sync_from_remote(&mut self, plugins: Vec<&str>) -> Result<usize>
Sync plugins from remote to local cache
Sourcepub fn prune_remote_cache(&mut self)
pub fn prune_remote_cache(&mut self)
Prune remote cache
Sourcepub fn cache_stats(&self) -> CacheStats
pub fn cache_stats(&self) -> CacheStats
Get cache statistics
Auto Trait Implementations§
impl Freeze for HybridRegistry
impl RefUnwindSafe for HybridRegistry
impl Send for HybridRegistry
impl Sync for HybridRegistry
impl Unpin for HybridRegistry
impl UnsafeUnpin for HybridRegistry
impl UnwindSafe for HybridRegistry
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