pub struct PluginManifest {Show 14 fields
pub name: String,
pub version: String,
pub description: String,
pub author: Option<String>,
pub license: Option<String>,
pub homepage: Option<String>,
pub protocol_version: u32,
pub runtime: Runtime,
pub permissions: Permissions,
pub limits: Limits,
pub checksums: IndexMap<String, String>,
pub nodes: Vec<NodeDescriptor>,
pub tools: Vec<ToolSpec>,
pub allow_unprefixed_kinds: bool,
}Expand description
A parsed and validated plugin manifest.
Fields§
§name: String§version: String§description: String§license: Option<String>§homepage: Option<String>§protocol_version: u32§runtime: Runtime§permissions: Permissions§limits: Limits§checksums: IndexMap<String, String>relative path -> sha256 hex, verified before each process start.
nodes: Vec<NodeDescriptor>§tools: Vec<ToolSpec>§allow_unprefixed_kinds: boolAllow node kinds that do not start with <name>..
Implementations§
Source§impl PluginManifest
impl PluginManifest
Sourcepub fn from_json(text: &str) -> Result<Self, PluginError>
pub fn from_json(text: &str) -> Result<Self, PluginError>
Parse a manifest from JSON text.
Sourcepub fn from_yaml(text: &str) -> Result<Self, PluginError>
pub fn from_yaml(text: &str) -> Result<Self, PluginError>
Parse a manifest from YAML text.
Sourcepub fn from_file(path: &Path) -> Result<Self, PluginError>
pub fn from_file(path: &Path) -> Result<Self, PluginError>
Read a manifest file (JSON or YAML by extension).
Sourcepub fn validate(&self) -> Result<(), PluginError>
pub fn validate(&self) -> Result<(), PluginError>
Check names, kinds and limits.
Trait Implementations§
Source§impl Clone for PluginManifest
impl Clone for PluginManifest
Source§impl Debug for PluginManifest
impl Debug for PluginManifest
Source§impl<'de> Deserialize<'de> for PluginManifest
impl<'de> Deserialize<'de> for PluginManifest
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
Source§impl PartialEq for PluginManifest
impl PartialEq for PluginManifest
Source§impl Serialize for PluginManifest
impl Serialize for PluginManifest
impl StructuralPartialEq for PluginManifest
Auto Trait Implementations§
impl Forget for PluginManifest
impl Freeze for PluginManifest
impl Move for PluginManifest
impl RefUnwindSafe for PluginManifest
impl Send for PluginManifest
impl Sync for PluginManifest
impl Unpin for PluginManifest
impl UnsafeUnpin for PluginManifest
impl UnwindSafe for PluginManifest
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