pub struct PluginCatalog { /* private fields */ }Expand description
Immutable catalog projection. Construction validates and sorts records; querying it cannot load or instantiate a plugin.
Implementations§
Source§impl PluginCatalog
impl PluginCatalog
pub fn new( records: impl IntoIterator<Item = PluginCatalogRecord>, ) -> Result<Self, PluginCatalogError>
pub fn from_records( records: impl IntoIterator<Item = PluginCatalogRecord>, ) -> Result<Self, PluginCatalogError>
pub fn empty() -> Self
Sourcepub fn from_json(bytes: &[u8]) -> Result<Self, PluginCatalogError>
pub fn from_json(bytes: &[u8]) -> Result<Self, PluginCatalogError>
Decodes a complete catalog snapshot and rebuilds its deterministic index/fingerprint. No executable artifact is touched.
pub fn to_json(&self) -> Result<Vec<u8>, PluginCatalogError>
pub fn records(&self) -> &[PluginCatalogRecord]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn fingerprint(&self) -> &str
pub fn find( &self, plugin_id: &str, ) -> impl Iterator<Item = &PluginCatalogRecord>
Trait Implementations§
Source§impl Clone for PluginCatalog
impl Clone for PluginCatalog
Source§fn clone(&self) -> PluginCatalog
fn clone(&self) -> PluginCatalog
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PluginCatalog
impl Debug for PluginCatalog
Source§impl<'de> Deserialize<'de> for PluginCatalog
impl<'de> Deserialize<'de> for PluginCatalog
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
impl Eq for PluginCatalog
Source§impl PartialEq for PluginCatalog
impl PartialEq for PluginCatalog
Source§impl Serialize for PluginCatalog
impl Serialize for PluginCatalog
impl StructuralPartialEq for PluginCatalog
Auto Trait Implementations§
impl Freeze for PluginCatalog
impl RefUnwindSafe for PluginCatalog
impl Send for PluginCatalog
impl Sync for PluginCatalog
impl Unpin for PluginCatalog
impl UnsafeUnpin for PluginCatalog
impl UnwindSafe for PluginCatalog
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