pub struct RegistryIndex {
pub plugins: Vec<RegistryEntry>,
}Expand description
The full registry index loaded from disk or network.
Fields§
§plugins: Vec<RegistryEntry>Implementations§
Source§impl RegistryIndex
impl RegistryIndex
Sourcepub fn load_cached(data_dir: &Path) -> Option<Self>
pub fn load_cached(data_dir: &Path) -> Option<Self>
Load a cached registry index from the data directory.
Returns None if the cache is missing or expired.
Sourcepub fn save_cache(&self, data_dir: &Path) -> Result<()>
pub fn save_cache(&self, data_dir: &Path) -> Result<()>
Save the registry index to the cache directory.
Sourcepub fn search(&self, query: &str) -> Vec<&RegistryEntry>
pub fn search(&self, query: &str) -> Vec<&RegistryEntry>
Search the index by query string (case-insensitive substring match on id, description, and category).
Sourcepub fn get(&self, id: &str) -> Option<&RegistryEntry>
pub fn get(&self, id: &str) -> Option<&RegistryEntry>
Look up a specific plugin by id.
Trait Implementations§
Source§impl Clone for RegistryIndex
impl Clone for RegistryIndex
Source§fn clone(&self) -> RegistryIndex
fn clone(&self) -> RegistryIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RegistryIndex
impl Debug for RegistryIndex
Source§impl Default for RegistryIndex
impl Default for RegistryIndex
Source§fn default() -> RegistryIndex
fn default() -> RegistryIndex
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RegistryIndex
impl<'de> Deserialize<'de> for RegistryIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RegistryIndex
impl RefUnwindSafe for RegistryIndex
impl Send for RegistryIndex
impl Sync for RegistryIndex
impl Unpin for RegistryIndex
impl UnsafeUnpin for RegistryIndex
impl UnwindSafe for RegistryIndex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read more