Skip to main content

PluginArtifactDescriptor

Struct PluginArtifactDescriptor 

Source
pub struct PluginArtifactDescriptor {
Show 17 fields pub schema_version: u32, pub plugin_id: String, pub version: String, pub publisher: String, pub transport: PluginArtifactTransport, pub target: String, pub format: PluginArtifactFormat, pub architecture: String, pub abi_major: u16, pub abi_minor_min: u16, pub abi_minor_max: u16, pub capabilities: Vec<PluginArtifactCapability>, pub requires: Vec<PluginRequirement>, pub provides: Vec<PluginProvision>, pub runtime_dependencies: Vec<PluginRuntimeDependency>, pub resource_policy: PluginResourcePolicy, pub migration_version: String,
}
Expand description

Artifact metadata that can be inspected without opening the artifact.

Fields§

§schema_version: u32§plugin_id: String§version: String§publisher: String§transport: PluginArtifactTransport§target: String§format: PluginArtifactFormat§architecture: String§abi_major: u16§abi_minor_min: u16§abi_minor_max: u16§capabilities: Vec<PluginArtifactCapability>§requires: Vec<PluginRequirement>§provides: Vec<PluginProvision>§runtime_dependencies: Vec<PluginRuntimeDependency>§resource_policy: PluginResourcePolicy§migration_version: String

Implementations§

Source§

impl PluginArtifactDescriptor

Source

pub fn from_parts( plugin_id: impl Into<String>, version: impl Into<String>, publisher: impl Into<String>, transport: PluginArtifactTransport, target: impl Into<String>, format: PluginArtifactFormat, architecture: impl Into<String>, abi_major: u16, abi_minor_min: u16, abi_minor_max: u16, capabilities: Vec<PluginArtifactCapability>, ) -> Result<Self, PluginCatalogError>

Constructs and validates a descriptor from the stable artifact fields. Optional dependency/resource declarations can be added before calling Self::canonicalize.

Source

pub fn from_json(bytes: &[u8]) -> Result<Self, PluginCatalogError>

Decodes and validates one descriptor from canonical JSON input.

Source

pub fn to_json(&self) -> Result<Vec<u8>, PluginCatalogError>

Encodes the validated descriptor in deterministic JSON form.

Source

pub fn validate(&self) -> Result<(), PluginCatalogError>

Validates the descriptor without loading or probing an artifact.

Source

pub fn canonicalize( &self, ) -> Result<CanonicalPluginArtifactDescriptor, PluginCatalogError>

Produces stable JSON and a SHA-256 identity for catalog metadata.

Source

pub fn fingerprint(&self) -> Result<String, PluginCatalogError>

Source

pub fn plugin_reference( &self, capability_instance_id: Option<String>, ) -> Result<PluginReference, PluginCatalogError>

Trait Implementations§

Source§

impl Clone for PluginArtifactDescriptor

Source§

fn clone(&self) -> PluginArtifactDescriptor

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PluginArtifactDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PluginArtifactDescriptor

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for PluginArtifactDescriptor

Source§

impl PartialEq for PluginArtifactDescriptor

Source§

fn eq(&self, other: &PluginArtifactDescriptor) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PluginArtifactDescriptor

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PluginArtifactDescriptor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.