pub struct PluginManifest { /* private fields */ }Expand description
Expected schema of a plugin manifest. Should match the latest Spin plugin manifest JSON schema: https://github.com/spinframework/spin-plugins/tree/main/json-schema
Implementations§
Source§impl PluginManifest
impl PluginManifest
pub fn name(&self) -> String
pub fn version(&self) -> &str
pub fn license(&self) -> &str
pub fn spin_compatibility(&self) -> String
pub fn description(&self) -> Option<&str>
pub fn homepage_url(&self) -> Option<Url>
pub fn has_compatible_package(&self) -> bool
pub fn is_compatible_spin_version(&self, spin_version: &str) -> bool
pub fn try_version(&self) -> Result<Version, Error>
pub fn compare_versions(&self, other: &Self) -> Option<Ordering>
Sourcepub fn get_package(&self) -> Result<&PluginPackage>
pub fn get_package(&self) -> Result<&PluginPackage>
Gets the appropriate package for the running OS and Arch if exists
Trait Implementations§
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§fn eq(&self, other: &PluginManifest) -> bool
fn eq(&self, other: &PluginManifest) -> bool
Tests for
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§
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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>
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