pub struct TensorWasmInstance { /* private fields */ }Expand description
A running Wasm instance.
Implementations§
Source§impl TensorWasmInstance
impl TensorWasmInstance
Sourcepub fn new(store: Store<InstanceState>, instance: Instance) -> Self
pub fn new(store: Store<InstanceState>, instance: Instance) -> Self
Construct a TensorWasmInstance from a fully-instantiated wasmtime
(store, instance) pair. Typically called by
TensorWasmExecutor::spawn_instance.
Sourcepub fn instance_id(&self) -> InstanceId
pub fn instance_id(&self) -> InstanceId
Unique instance identifier.
Sourcepub fn store(&mut self) -> &mut Store<InstanceState>
pub fn store(&mut self) -> &mut Store<InstanceState>
Borrow the wasmtime wasmtime::Store.
Sourcepub fn wasmtime_instance(&self) -> &Instance
pub fn wasmtime_instance(&self) -> &Instance
Borrow the wasmtime wasmtime::Instance.
Auto Trait Implementations§
impl !RefUnwindSafe for TensorWasmInstance
impl !UnwindSafe for TensorWasmInstance
impl Freeze for TensorWasmInstance
impl Send for TensorWasmInstance
impl Sync for TensorWasmInstance
impl Unpin for TensorWasmInstance
impl UnsafeUnpin for TensorWasmInstance
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