pub struct WasmInstance {
pub store: Store<HostState>,
pub instance: Instance,
}Expand description
Instance aktif modul WASM dengan memori dan store terisolasi.
Fields§
§store: Store<HostState>§instance: InstanceImplementations§
Source§impl WasmInstance
impl WasmInstance
Sourcepub fn call_i32(
&mut self,
func_name: &str,
arg: i32,
) -> Result<i32, SandboxError>
pub fn call_i32( &mut self, func_name: &str, arg: i32, ) -> Result<i32, SandboxError>
Eksekusi fungsi numerik (i32) -> i32
Sourcepub fn get_memory(&self) -> Result<Memory, SandboxError>
pub fn get_memory(&self) -> Result<Memory, SandboxError>
Mendapatkan export memori dari guest WASM
Sourcepub fn call_string_transform(
&mut self,
func_name: &str,
input: &str,
) -> Result<String, SandboxError>
pub fn call_string_transform( &mut self, func_name: &str, input: &str, ) -> Result<String, SandboxError>
Eksekusi transformasi string menggunakan shared memory buffer guest
Auto Trait Implementations§
impl !RefUnwindSafe for WasmInstance
impl !UnwindSafe for WasmInstance
impl Forget for WasmInstance
impl Freeze for WasmInstance
impl Move for WasmInstance
impl Send for WasmInstance
impl Sync for WasmInstance
impl Unpin for WasmInstance
impl UnsafeUnpin for WasmInstance
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