Struct wasmtime_provider::WasmtimeEngineProvider
source · [−]pub struct WasmtimeEngineProvider { /* private fields */ }
Expand description
A waPC engine provider that encapsulates the Wasmtime WebAssembly runtime
Implementations
sourceimpl WasmtimeEngineProvider
impl WasmtimeEngineProvider
sourcepub fn new(
buf: &[u8],
wasi: Option<WasiParams>
) -> Result<WasmtimeEngineProvider, Error>
pub fn new(
buf: &[u8],
wasi: Option<WasiParams>
) -> Result<WasmtimeEngineProvider, Error>
Creates a new instance of a WasmtimeEngineProvider.
sourcepub fn new_with_engine(
buf: &[u8],
engine: Engine,
wasi: Option<WasiParams>
) -> Result<Self, Error>
pub fn new_with_engine(
buf: &[u8],
engine: Engine,
wasi: Option<WasiParams>
) -> Result<Self, Error>
Creates a new instance of a WasmtimeEngineProvider from a separately created wasmtime::Engine.
Trait Implementations
sourceimpl Clone for WasmtimeEngineProvider
impl Clone for WasmtimeEngineProvider
sourceimpl WebAssemblyEngineProvider for WasmtimeEngineProvider
impl WebAssemblyEngineProvider for WasmtimeEngineProvider
sourcefn 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 Read more
sourcefn 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 Read more
Auto Trait Implementations
impl !RefUnwindSafe for WasmtimeEngineProvider
impl Send for WasmtimeEngineProvider
impl Sync for WasmtimeEngineProvider
impl Unpin for WasmtimeEngineProvider
impl !UnwindSafe for WasmtimeEngineProvider
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
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.
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,
Create a new SetFdFlags
value for use with set_fd_flags
. Read more
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more