pub struct WasmtimeEngineProvider { /* private fields */ }
Expand description
A waPC engine provider that encapsulates the Wasmtime WebAssembly runtime
Implementations§
source§impl WasmtimeEngineProvider
impl WasmtimeEngineProvider
sourcepub fn new(
buf: &[u8],
wasi: Option<WasiParams>
) -> Result<WasmtimeEngineProvider, Error>
👎Deprecated since 1.2.0: please use WasmtimeEngineProviderBuilder
instead to create a WasmtimeEngineProvider
pub fn new( buf: &[u8], wasi: Option<WasiParams> ) -> Result<WasmtimeEngineProvider, Error>
WasmtimeEngineProviderBuilder
instead to create a WasmtimeEngineProvider
Creates a new instance of a WasmtimeEngineProvider.
sourcepub fn new_with_engine(
buf: &[u8],
engine: Engine,
wasi: Option<WasiParams>
) -> Result<Self, Error>
👎Deprecated since 1.2.0: please use WasmtimeEngineProviderBuilder
instead to create a WasmtimeEngineProvider
pub fn new_with_engine( buf: &[u8], engine: Engine, wasi: Option<WasiParams> ) -> Result<Self, Error>
WasmtimeEngineProviderBuilder
instead to create a WasmtimeEngineProvider
Creates a new instance of a WasmtimeEngineProvider from a separately created wasmtime::Engine.
Trait Implementations§
source§impl Clone for WasmtimeEngineProvider
impl Clone for WasmtimeEngineProvider
source§impl WebAssemblyEngineProvider for WasmtimeEngineProvider
impl WebAssemblyEngineProvider for WasmtimeEngineProvider
source§fn init(
&mut self,
host: Arc<ModuleState>
) -> Result<(), Box<dyn Error + Send + Sync + 'static>>
fn init( &mut self, host: Arc<ModuleState> ) -> Result<(), Box<dyn Error + Send + Sync + 'static>>
Tell the engine provider that it can do whatever processing it needs to do for
initialization and give it access to the module state
source§fn call(
&mut self,
op_length: i32,
msg_length: i32
) -> Result<i32, Box<dyn Error + Send + Sync + 'static>>
fn call( &mut self, op_length: i32, msg_length: i32 ) -> Result<i32, Box<dyn Error + Send + Sync + 'static>>
Trigger the waPC function call. Engine provider is responsible for execution and using the appropriate methods
on the module host. When this function is complete, the guest response and optionally the guest
error must be set to represent the high-level call result
Auto Trait Implementations§
impl Freeze for WasmtimeEngineProvider
impl !RefUnwindSafe for WasmtimeEngineProvider
impl Send for WasmtimeEngineProvider
impl Sync for WasmtimeEngineProvider
impl Unpin for WasmtimeEngineProvider
impl !UnwindSafe for WasmtimeEngineProvider
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read more