pub struct Marine { /* private fields */ }
Implementations
sourceimpl Marine
impl Marine
sourcepub fn with_raw_config<C>(config: C) -> Result<Self, MarineError>where
C: TryInto<MarineConfig>,
MarineError: From<C::Error>,
pub fn with_raw_config<C>(config: C) -> Result<Self, MarineError>where
C: TryInto<MarineConfig>,
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>,
MarineError: From<C::Error>,
pub fn with_modules<C>(
modules: HashMap<String, Vec<u8>>,
config: C
) -> Result<Self, MarineError>where
C: TryInto<MarineConfig>,
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>,
MarineError: From<C::Error>,
pub fn with_module_names<C>(
names: &HashMap<String, PathBuf>,
config: C
) -> Result<Self, MarineError>where
C: TryInto<MarineConfig>,
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.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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