Skip to main content

WasiPlugin

Struct WasiPlugin 

Source
pub struct WasiPlugin { /* private fields */ }
Expand description

Manifest-backed runtime that models a native WASI plugin contract.

Implementations§

Source§

impl WasiPlugin

Source

pub fn load(source: &Path) -> Result<Self, PluginError>

Loads a native plugin descriptor from component.toml.

Trait Implementations§

Source§

impl Debug for WasiPlugin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Plugin for WasiPlugin

Source§

fn manifest(&self) -> &PluginManifest

Returns the immutable plugin manifest.
Source§

fn available_versions( &self, _args: &[String], ) -> Result<Vec<AvailableVersion>, PluginError>

Lists versions that the plugin can install.
Source§

fn install_plan(&self, version: &str) -> Result<InstallPlan, PluginError>

Builds an install plan for the requested version.
Source§

fn env_keys( &self, runtime: &InstalledRuntime, ) -> Result<Vec<EnvKey>, PluginError>

Returns environment keys that should be exported for the installed version.
Source§

fn parse_legacy_file( &self, file_name: &str, _file_path: &Path, content: &str, installed_versions: &[String], strategy: &str, ) -> Result<Option<String>, PluginError>

Attempts to map a legacy file content to a version.
Source§

fn post_install(&self, _runtime: &InstalledRuntime) -> Result<(), PluginError>

Runs optional post-install logic after artifacts are materialized.
Source§

fn pre_use( &self, _requested_version: &str, _scope: &str, _cwd: &Path, _previous_version: Option<&str>, _installed: &[InstalledRuntime], ) -> Result<Option<String>, PluginError>

Allows a plugin to map the requested version before activation.
Source§

fn pre_uninstall(&self, _runtime: &InstalledRuntime) -> Result<(), PluginError>

Runs optional pre-uninstall logic before a version is removed.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.