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>where
C: TryInto<MarineConfig<WB>>,
MarineError: From<C::Error>,
pub fn with_raw_config<C>(config: C) -> Result<Self, MarineError>where C: TryInto<MarineConfig<WB>>, MarineError: From<C::Error>,
Creates Marine from config deserialized from TOML.
sourcepub fn with_modules<C>(
modules: HashMap<String, Vec<u8>>,
config: C
) -> Result<Self, MarineError>where
C: TryInto<MarineConfig<WB>>,
MarineError: From<C::Error>,
pub fn with_modules<C>( modules: HashMap<String, Vec<u8>>, config: C ) -> Result<Self, MarineError>where C: TryInto<MarineConfig<WB>>, MarineError: From<C::Error>,
Creates Marine with given modules.
sourcepub fn with_module_names<C>(
names: &HashMap<String, PathBuf>,
config: C
) -> Result<Self, MarineError>where
C: TryInto<MarineConfig<WB>>,
MarineError: From<C::Error>,
pub fn with_module_names<C>( names: &HashMap<String, PathBuf>, config: C ) -> Result<Self, MarineError>where C: TryInto<MarineConfig<WB>>, MarineError: From<C::Error>,
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> !RefUnwindSafe for Marine<WB>
impl<WB> Send for Marine<WB>where WB: Send, <WB as WasmBackend>::Instance: Send, <WB as WasmBackend>::Store: Send,
impl<WB> !Sync for Marine<WB>
impl<WB> Unpin for Marine<WB>where WB: Unpin, <WB as WasmBackend>::Store: Unpin,
impl<WB> !UnwindSafe for Marine<WB>
Blanket Implementations§
§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.