pub struct PluginStore { /* private fields */ }
Expand description
Houses utilities for getting the path to Spin plugin directories.
Implementations§
Source§impl PluginStore
impl PluginStore
pub fn new(root: impl Into<PathBuf>) -> Self
pub fn try_default() -> Result<Self>
Sourcepub fn get_plugins_directory(&self) -> &Path
pub fn get_plugins_directory(&self) -> &Path
Gets the path to where Spin plugin are installed.
Sourcepub fn plugin_subdirectory_path(&self, plugin_name: &str) -> PathBuf
pub fn plugin_subdirectory_path(&self, plugin_name: &str) -> PathBuf
Get the path to the subdirectory of an installed plugin.
Sourcepub fn installed_manifests_directory(&self) -> PathBuf
pub fn installed_manifests_directory(&self) -> PathBuf
Get the path to the manifests directory which contains the plugin manifests of all installed Spin plugins.
pub fn installed_manifest_path(&self, plugin_name: &str) -> PathBuf
pub fn installed_binary_path(&self, plugin_name: &str) -> PathBuf
pub fn installation_record_file(&self, plugin_name: &str) -> PathBuf
pub fn installed_manifests(&self) -> Result<Vec<PluginManifest>>
pub fn catalogue_manifests(&self) -> Result<Vec<PluginManifest>>
Sourcepub fn read_plugin_manifest(
&self,
plugin_name: &str,
) -> PluginLookupResult<PluginManifest>
pub fn read_plugin_manifest( &self, plugin_name: &str, ) -> PluginLookupResult<PluginManifest>
Returns the PluginManifest for an installed plugin with a given name. Looks up and parses the JSON plugin manifest file into object form.
Auto Trait Implementations§
impl Freeze for PluginStore
impl RefUnwindSafe for PluginStore
impl Send for PluginStore
impl Sync for PluginStore
impl Unpin for PluginStore
impl UnwindSafe for PluginStore
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
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