pub struct PluginManifest {
pub id: String,
pub version: String,
pub abi: String,
pub kind: PluginKind,
pub artifacts: Vec<PluginArtifact>,
pub resources: Vec<PluginResource>,
pub descriptor: Descriptor,
}Expand description
A plugin’s manifest.
Fields§
§id: StringReverse-DNS id, equal to the descriptor’s.
version: StringThe package’s semantic version.
abi: StringThe plugin ABI, alpha2-plugin/1.
kind: PluginKindThe contract the plugin implements.
artifacts: Vec<PluginArtifact>The code, one artifact per target.
resources: Vec<PluginResource>Files the plugin reads through resource().
descriptor: DescriptorThe descriptor describe() returns.
Implementations§
Source§impl PluginManifest
impl PluginManifest
Sourcepub fn from_json(text: &str) -> Result<Self, ManifestError>
pub fn from_json(text: &str) -> Result<Self, ManifestError>
Reads and checks a manifest.
§Errors
ManifestError::UnsupportedAbi for another ABI, checked before the rest so that a
manifest of a later ABI is reported as such; ManifestError::Invalid otherwise.
Sourcepub fn artifact(
&self,
target: &str,
kind: ArtifactKind,
) -> Option<&PluginArtifact>
pub fn artifact( &self, target: &str, kind: ArtifactKind, ) -> Option<&PluginArtifact>
The artifact for target, by kind.
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
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<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> ⓘ
Converts
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> ⓘ
Converts
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