pub struct PluginCatalogRecord {
pub schema_version: u32,
pub descriptor: PluginArtifactDescriptor,
pub artifact_path: String,
pub artifact_sha256: String,
pub source: PluginCatalogSource,
pub diagnostics: Vec<PluginCatalogDiagnostic>,
}Expand description
A catalog record adds immutable artifact provenance and content identity to
PluginArtifactDescriptor. It intentionally has no live owner field.
Fields§
§schema_version: u32§descriptor: PluginArtifactDescriptor§artifact_path: String§artifact_sha256: String§source: PluginCatalogSource§diagnostics: Vec<PluginCatalogDiagnostic>Implementations§
Source§impl PluginCatalogRecord
impl PluginCatalogRecord
pub fn from_descriptor( descriptor: PluginArtifactDescriptor, artifact_path: impl Into<String>, artifact_sha256: impl Into<String>, source: PluginCatalogSource, ) -> Result<Self, PluginCatalogError>
pub fn new( descriptor: PluginArtifactDescriptor, artifact_path: impl Into<String>, artifact_sha256: impl Into<String>, source: PluginCatalogSource, ) -> Result<Self, PluginCatalogError>
Sourcepub fn from_json(bytes: &[u8]) -> Result<Self, PluginCatalogError>
pub fn from_json(bytes: &[u8]) -> Result<Self, PluginCatalogError>
Decodes and validates one catalog record from JSON input.
pub fn validate(&self) -> Result<(), PluginCatalogError>
pub fn descriptor(&self) -> &PluginArtifactDescriptor
pub fn artifact_path(&self) -> &str
pub fn artifact_sha256(&self) -> &str
pub fn identity_key(&self) -> String
Sourcepub fn canonical_identity_key(&self) -> String
pub fn canonical_identity_key(&self) -> String
Returns an unambiguous key for sorting and indexing catalog records.
The human-readable Self::identity_key is retained for diagnostics;
this key length-prefixes every component so opaque target labels may
contain the diagnostic separator without colliding.
pub fn canonicalize(&self) -> Result<Vec<u8>, PluginCatalogError>
pub fn fingerprint(&self) -> Result<String, PluginCatalogError>
Trait Implementations§
Source§impl Clone for PluginCatalogRecord
impl Clone for PluginCatalogRecord
Source§fn clone(&self) -> PluginCatalogRecord
fn clone(&self) -> PluginCatalogRecord
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 PluginCatalogRecord
impl Debug for PluginCatalogRecord
Source§impl<'de> Deserialize<'de> for PluginCatalogRecord
impl<'de> Deserialize<'de> for PluginCatalogRecord
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 PluginCatalogRecord
Source§impl PartialEq for PluginCatalogRecord
impl PartialEq for PluginCatalogRecord
Source§impl Serialize for PluginCatalogRecord
impl Serialize for PluginCatalogRecord
impl StructuralPartialEq for PluginCatalogRecord
Auto Trait Implementations§
impl Freeze for PluginCatalogRecord
impl RefUnwindSafe for PluginCatalogRecord
impl Send for PluginCatalogRecord
impl Sync for PluginCatalogRecord
impl Unpin for PluginCatalogRecord
impl UnsafeUnpin for PluginCatalogRecord
impl UnwindSafe for PluginCatalogRecord
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