pub struct PluginManifest {Show 13 fields
pub id: PluginId,
pub version: Version,
pub abi: AbiRange,
pub depends_on: Vec<PluginDep>,
pub capabilities: CapabilitySet,
pub determinism: Determinism,
pub side_effects: SideEffects,
pub scope: Scope,
pub hash: Option<String>,
pub signature: Option<ManifestSignature>,
pub provides: ProvidedSurfaces,
pub docs: String,
pub metadata: BTreeMap<String, String>,
}Expand description
Top-level plugin manifest.
Authored as TOML, exchanged as JSON (the WASM manifest-json export
returns this serialized to JSON). Round-trips through serde in either
format.
Fields§
§id: PluginIdReverse-DNS plugin id.
version: VersionPlugin semantic version.
abi: AbiRangeABI range this plugin supports.
depends_on: Vec<PluginDep>Plugins this depends on. May be empty.
capabilities: CapabilitySetCapability requests; granted set is intersection with host grants.
determinism: DeterminismDeterminism characterization.
side_effects: SideEffectsSide-effect characterization.
scope: ScopeLifetime scope.
hash: Option<String>Optional hash pin (blake3 hex string of the plugin payload).
signature: Option<ManifestSignature>Optional Ed25519 signature over canonical-JSON manifest + payload hash.
provides: ProvidedSurfacesDeclarative surface summary.
docs: StringMarkdown docs surfaced via uni plugin help <qname> and
CALL uni.plugin.help('qname').
metadata: BTreeMap<String, String>Free-form metadata (author, license, repo, etc.).
Implementations§
Source§impl PluginManifest
impl PluginManifest
Sourcepub fn from_toml(s: impl AsRef<str>) -> Result<Self, PluginError>
pub fn from_toml(s: impl AsRef<str>) -> Result<Self, PluginError>
Parse a manifest from a TOML string.
§Errors
Returns PluginError::ManifestParse if the input fails to parse.
Sourcepub fn from_json(s: impl AsRef<str>) -> Result<Self, PluginError>
pub fn from_json(s: impl AsRef<str>) -> Result<Self, PluginError>
Parse a manifest from a JSON string.
§Errors
Returns PluginError::ManifestParse if the input fails to parse.
Sourcepub fn to_toml(&self) -> Result<String, PluginError>
pub fn to_toml(&self) -> Result<String, PluginError>
Serialize this manifest to TOML.
§Errors
Returns PluginError::ManifestParse if serialization fails
(unusual — only happens with non-stringifiable map keys, which the
manifest doesn’t produce).
Sourcepub fn to_json(&self) -> Result<String, PluginError>
pub fn to_json(&self) -> Result<String, PluginError>
Serialize this manifest to JSON (compact).
§Errors
Returns PluginError::ManifestParse if serialization fails.
Trait Implementations§
Source§impl Clone for PluginManifest
impl Clone for PluginManifest
Source§fn clone(&self) -> PluginManifest
fn clone(&self) -> PluginManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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>,
impl Eq for PluginManifest
Source§impl PartialEq for PluginManifest
impl PartialEq for PluginManifest
Source§fn eq(&self, other: &PluginManifest) -> bool
fn eq(&self, other: &PluginManifest) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PluginManifest
impl Serialize for PluginManifest
impl StructuralPartialEq for PluginManifest
Auto Trait Implementations§
impl Freeze 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§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more