pub struct Manifest {Show 13 fields
pub name: String,
pub version: String,
pub description: Option<String>,
pub authors: Vec<String>,
pub license: Option<String>,
pub api_version: ApiVersion,
pub capabilities: Vec<String>,
pub dependencies: Vec<Dependency>,
pub source: Option<String>,
pub bytecode: Option<String>,
pub exports: Vec<String>,
pub tags: Vec<String>,
pub metadata: HashMap<String, String>,
}Expand description
Plugin manifest defining metadata and requirements.
Fields§
§name: StringPlugin name (unique identifier).
version: StringPlugin version.
description: Option<String>Human-readable description.
Plugin authors.
license: Option<String>Plugin license.
api_version: ApiVersionRequired Fusabi API version.
capabilities: Vec<String>Required capabilities.
dependencies: Vec<Dependency>Plugin dependencies.
source: Option<String>Entry point source file (.fsx).
bytecode: Option<String>Pre-compiled bytecode file (.fzb).
exports: Vec<String>Exported functions.
Plugin tags for categorization.
metadata: HashMap<String, String>Custom metadata.
Implementations§
Source§impl Manifest
impl Manifest
Sourcepub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, version: impl Into<String>) -> Self
Create a new manifest with required fields.
Sourcepub fn requires_capability(&self, cap: &str) -> bool
pub fn requires_capability(&self, cap: &str) -> bool
Check if this manifest requires a capability.
Sourcepub fn is_compatible_with_host(&self, host_version: &ApiVersion) -> bool
pub fn is_compatible_with_host(&self, host_version: &ApiVersion) -> bool
Check if this manifest is compatible with a host API version.
Sourcepub fn entry_point(&self) -> Option<&str>
pub fn entry_point(&self) -> Option<&str>
Get the entry point path (source or bytecode).
Sourcepub fn uses_source(&self) -> bool
pub fn uses_source(&self) -> bool
Check if using source code (vs pre-compiled bytecode).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Manifest
impl<'de> Deserialize<'de> for Manifest
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 Manifest
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnwindSafe for Manifest
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