pub struct PluginLoader { /* private fields */ }Expand description
Plugin loader with wasmtime engine
Implementations§
Source§impl PluginLoader
impl PluginLoader
Sourcepub fn new() -> Result<Self, LoaderError>
pub fn new() -> Result<Self, LoaderError>
Create a new plugin loader with security settings
Configures:
- Fuel limits (CPU usage) - 10M instructions per execution
- Stack limits - 1MB maximum WASM stack
- Memory64 disabled for wasm32 compatibility
Sourcepub fn load(&self, wasm_bytes: &[u8]) -> Result<LoadedPlugin, LoaderError>
pub fn load(&self, wasm_bytes: &[u8]) -> Result<LoadedPlugin, LoaderError>
Load a plugin from Wasm bytes
Auto Trait Implementations§
impl Freeze for PluginLoader
impl !RefUnwindSafe for PluginLoader
impl Send for PluginLoader
impl Sync for PluginLoader
impl Unpin 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