pub struct PluginLoader { /* private fields */ }Expand description
Plugin loader
Implementations§
Source§impl PluginLoader
impl PluginLoader
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new plugin loader. Accepts both raw .wasm files
(the dev-loop format) and packed .tar.gz artefacts (the
distribution format produced by helios-plugin pack).
Sourcepub fn with_signature_verifier(self, verifier: SignatureVerifier) -> Self
pub fn with_signature_verifier(self, verifier: SignatureVerifier) -> Self
Attach a trust-root verifier. Once set, every load() call requires a matching .sig sidecar; loads without one fail.
Sourcepub fn add_search_path(&mut self, path: PathBuf)
pub fn add_search_path(&mut self, path: PathBuf)
Add a search path
Sourcepub fn load(
&self,
path: &Path,
) -> Result<(PluginManifest, Vec<u8>), PluginLoadError>
pub fn load( &self, path: &Path, ) -> Result<(PluginManifest, Vec<u8>), PluginLoadError>
Load a plugin from a file path. Two accepted shapes:
- Bare
.wasm(the dev-loop format) — looks for a sidecar.yaml/.jsonmanifest and, if a trust root is attached, a.sigsidecar. - Packed
.tar.gzartefact (the distribution format produced byhelios-plugin pack) — manifest and signature are baked into the tarball; no sidecars needed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PluginLoader
impl RefUnwindSafe for PluginLoader
impl Send for PluginLoader
impl Sync for PluginLoader
impl Unpin for PluginLoader
impl UnsafeUnpin for PluginLoader
impl UnwindSafe for PluginLoader
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