pub struct Marine<WB: WasmBackend> { /* private fields */ }
Implementations§
source§impl<WB: WasmBackend> Marine<WB>
impl<WB: WasmBackend> Marine<WB>
sourcepub fn with_raw_config<C>(config: C) -> Result<Self, MarineError>
pub fn with_raw_config<C>(config: C) -> Result<Self, MarineError>
Creates Marine from config deserialized from TOML.
sourcepub fn with_modules<C>(
modules: HashMap<String, Vec<u8>>,
config: C
) -> Result<Self, MarineError>
pub fn with_modules<C>( modules: HashMap<String, Vec<u8>>, config: C ) -> Result<Self, MarineError>
Creates Marine with given modules.
sourcepub fn with_module_names<C>(
names: &HashMap<String, PathBuf>,
config: C
) -> Result<Self, MarineError>
pub fn with_module_names<C>( names: &HashMap<String, PathBuf>, config: C ) -> Result<Self, MarineError>
Searches for modules in config.modules_dir
, loads only those in the names
set
sourcepub fn call_with_ivalues(
&mut self,
module_name: impl AsRef<str>,
func_name: impl AsRef<str>,
args: &[IValue],
call_parameters: CallParameters
) -> Result<Vec<IValue>, MarineError>
pub fn call_with_ivalues( &mut self, module_name: impl AsRef<str>, func_name: impl AsRef<str>, args: &[IValue], call_parameters: CallParameters ) -> Result<Vec<IValue>, MarineError>
Call a specified function of loaded on a startup module by its name.
sourcepub fn call_with_json(
&mut self,
module_name: impl AsRef<str>,
func_name: impl AsRef<str>,
json_args: JValue,
call_parameters: CallParameters
) -> Result<JValue, MarineError>
pub fn call_with_json( &mut self, module_name: impl AsRef<str>, func_name: impl AsRef<str>, json_args: JValue, call_parameters: CallParameters ) -> Result<JValue, MarineError>
Call a specified function of loaded on a startup module by its name.
sourcepub fn get_interface(&self) -> MarineInterface<'_>
pub fn get_interface(&self) -> MarineInterface<'_>
Return all export functions (name and signatures) of loaded modules.
sourcepub fn module_memory_stats(&self) -> MemoryStats<'_>
pub fn module_memory_stats(&self) -> MemoryStats<'_>
Return statistic of Wasm modules heap footprint.
Auto Trait Implementations§
impl<WB> !Freeze for Marine<WB>
impl<WB> !RefUnwindSafe for Marine<WB>
impl<WB> Send for Marine<WB>
impl<WB> !Sync for Marine<WB>
impl<WB> Unpin for Marine<WB>
impl<WB> !UnwindSafe for Marine<WB>
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