Skip to main content

Manifest

Struct Manifest 

Source
pub struct Manifest {
    pub bundle_version: String,
    pub plugin: PluginInfo,
    pub platforms: HashMap<String, PlatformInfo>,
    pub build_info: Option<BuildInfo>,
    pub sbom: Option<Sbom>,
    pub schema_checksum: Option<String>,
    pub notices: Option<String>,
    pub api: Option<ApiInfo>,
    pub public_key: Option<String>,
    pub schemas: HashMap<String, SchemaInfo>,
}
Expand description

Bundle manifest - the main descriptor for a plugin bundle.

This corresponds to the manifest.json file in the bundle root.

Fields§

§bundle_version: String

Bundle format version (e.g., “1.0”).

§plugin: PluginInfo

Plugin metadata.

§platforms: HashMap<String, PlatformInfo>

Platform-specific library information. Key is the platform string (e.g., “linux-x86_64”).

§build_info: Option<BuildInfo>

Build information (optional). Contains metadata about when/how the bundle was built.

§sbom: Option<Sbom>

SBOM (Software Bill of Materials) paths.

§schema_checksum: Option<String>

Combined checksum of all schema files. Used to verify schema compatibility when combining bundles.

§notices: Option<String>

Path to license notices file within the bundle.

§api: Option<ApiInfo>

API information (optional).

§public_key: Option<String>

Minisign public key for signature verification (base64-encoded). Format: “RWS…” (standard minisign public key format).

§schemas: HashMap<String, SchemaInfo>

Schema files embedded in the bundle.

Implementations§

Source§

impl Manifest

Source

pub fn new(name: &str, version: &str) -> Self

Create a new manifest with minimal required fields.

Source

pub fn add_platform( &mut self, platform: Platform, library_path: &str, checksum: &str, )

Add a platform with a release variant to the manifest.

This is a convenience method that adds the library as the release variant. For multiple variants, use add_platform_variant instead.

Source

pub fn add_platform_variant( &mut self, platform: Platform, variant: &str, library_path: &str, checksum: &str, build: Option<Value>, )

Add a specific variant to a platform.

If the platform doesn’t exist, it will be created.

Source

pub fn set_public_key(&mut self, public_key: String)

Set the public key for signature verification.

Source

pub fn add_schema( &mut self, name: String, path: String, format: String, checksum: String, description: Option<String>, )

Add a schema file to the manifest.

Source

pub fn set_build_info(&mut self, build_info: BuildInfo)

Set the build information.

Source

pub fn get_build_info(&self) -> Option<&BuildInfo>

Get the build information.

Source

pub fn set_sbom(&mut self, sbom: Sbom)

Set the SBOM paths.

Source

pub fn get_sbom(&self) -> Option<&Sbom>

Get the SBOM paths.

Source

pub fn set_schema_checksum(&mut self, checksum: String)

Set the schema checksum for bundle combining validation.

Source

pub fn get_schema_checksum(&self) -> Option<&str>

Get the schema checksum.

Source

pub fn set_notices(&mut self, path: String)

Set the notices file path.

Source

pub fn get_notices(&self) -> Option<&str>

Get the notices file path.

Source

pub fn get_variant( &self, platform: Platform, variant: Option<&str>, ) -> Option<&VariantInfo>

Get a specific variant for a platform.

Returns the release variant if variant is None.

Source

pub fn get_release_variant(&self, platform: Platform) -> Option<&VariantInfo>

Get the release variant for a platform (default).

Source

pub fn list_variants(&self, platform: Platform) -> Vec<&str>

List all variants for a platform.

Source

pub fn get_platform(&self, platform: Platform) -> Option<&PlatformInfo>

Get platform info for a specific platform.

Source

pub fn supports_platform(&self, platform: Platform) -> bool

Check if a platform is supported.

Source

pub fn supported_platforms(&self) -> Vec<Platform>

Get all supported platforms.

Source

pub fn validate(&self) -> BundleResult<()>

Validate the manifest.

Source

pub fn to_json(&self) -> BundleResult<String>

Serialize to JSON.

Source

pub fn from_json(json: &str) -> BundleResult<Self>

Deserialize from JSON.

Trait Implementations§

Source§

impl Clone for Manifest

Source§

fn clone(&self) -> Manifest

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Manifest

Source§

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

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

impl<'de> Deserialize<'de> for Manifest

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 Serialize for Manifest

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

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> 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 = Infallible

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.
Source§

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