Struct marine::generic::MarineModuleConfig
source · pub struct MarineModuleConfig<WB: WasmBackend> {
pub logger_enabled: bool,
pub host_imports: HashMap<HostAPIVersion, HashMap<String, HostImportDescriptor<WB>>>,
pub wasi: Option<MarineWASIConfig>,
pub logging_mask: i32,
}
Expand description
Various settings that could be used to guide Marine how to load a module in a proper way.
Fields§
§logger_enabled: bool
Defines whether Marine should provide a special host log_utf8_string function for this module.
host_imports: HashMap<HostAPIVersion, HashMap<String, HostImportDescriptor<WB>>>
Export from host functions that will be accessible on the Wasm side by provided name. The imports are provided separately for each marine host api version
wasi: Option<MarineWASIConfig>
A WASI config.
logging_mask: i32
Mask used to filter logs, for details see log_utf8_string
Implementations§
source§impl<WB: WasmBackend> MarineModuleConfig<WB>
impl<WB: WasmBackend> MarineModuleConfig<WB>
pub fn extend_wasi_envs(&mut self, new_envs: HashMap<String, String>)
pub fn root_wasi_files_at(&mut self, root: &Path)
Trait Implementations§
source§impl<WB: Default + WasmBackend> Default for MarineModuleConfig<WB>
impl<WB: Default + WasmBackend> Default for MarineModuleConfig<WB>
source§fn default() -> MarineModuleConfig<WB>
fn default() -> MarineModuleConfig<WB>
Returns the “default value” for a type. Read more
source§impl<'c, WB: WasmBackend> TryFrom<WithContext<'c, TomlMarineModuleConfig>> for MarineModuleConfig<WB>
impl<'c, WB: WasmBackend> TryFrom<WithContext<'c, TomlMarineModuleConfig>> for MarineModuleConfig<WB>
§type Error = MarineError
type Error = MarineError
The type returned in the event of a conversion error.
source§fn try_from(
toml_config: WithContext<'c, TomlMarineModuleConfig>
) -> Result<Self, Self::Error>
fn try_from( toml_config: WithContext<'c, TomlMarineModuleConfig> ) -> Result<Self, Self::Error>
Performs the conversion.
Auto Trait Implementations§
impl<WB> Freeze for MarineModuleConfig<WB>
impl<WB> !RefUnwindSafe for MarineModuleConfig<WB>
impl<WB> Send for MarineModuleConfig<WB>
impl<WB> Sync for MarineModuleConfig<WB>
impl<WB> Unpin for MarineModuleConfig<WB>
impl<WB> !UnwindSafe for MarineModuleConfig<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