Struct fluence_app_service::MarineModuleConfig
source · [−]pub struct MarineModuleConfig {
pub mem_pages_count: Option<u32>,
pub max_heap_size: Option<u64>,
pub logger_enabled: bool,
pub host_imports: HashMap<String, HostImportDescriptor, RandomState>,
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
mem_pages_count: Option<u32>
Maximum memory size accessible by a module in Wasm pages (64 Kb).
max_heap_size: Option<u64>
Maximum memory size for heap of Wasm module in bytes, if it set, mem_pages_count ignored.
logger_enabled: bool
Defines whether Marine should provide a special host log_utf8_string function for this module.
host_imports: HashMap<String, HostImportDescriptor, RandomState>
Export from host functions that will be accessible on the Wasm side by provided name.
wasi: Option<MarineWASIConfig>
A WASI config.
logging_mask: i32
Mask used to filter logs, for details see log_utf8_string
Implementations
sourceimpl MarineModuleConfig
impl MarineModuleConfig
pub fn extend_wasi_envs(
&mut self,
new_envs: HashMap<Vec<u8, Global>, Vec<u8, Global>, RandomState>
)
pub fn extend_wasi_files(
&mut self,
new_preopened_files: HashSet<PathBuf, RandomState>,
new_mapped_dirs: HashMap<String, PathBuf, RandomState>
)
Trait Implementations
sourceimpl Default for MarineModuleConfig
impl Default for MarineModuleConfig
sourcefn default() -> MarineModuleConfig
fn default() -> MarineModuleConfig
Returns the “default value” for a type. Read more
sourceimpl<'c> TryFrom<WithContext<'c, TomlMarineModuleConfig>> for MarineModuleConfig
impl<'c> TryFrom<WithContext<'c, TomlMarineModuleConfig>> for MarineModuleConfig
type Error = MarineError
type Error = MarineError
The type returned in the event of a conversion error.
sourcefn try_from(
toml_config: WithContext<'c, TomlMarineModuleConfig>
) -> Result<MarineModuleConfig, <MarineModuleConfig as TryFrom<WithContext<'c, TomlMarineModuleConfig>>>::Error>
fn try_from(
toml_config: WithContext<'c, TomlMarineModuleConfig>
) -> Result<MarineModuleConfig, <MarineModuleConfig as TryFrom<WithContext<'c, TomlMarineModuleConfig>>>::Error>
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for MarineModuleConfig
impl !Send for MarineModuleConfig
impl !Sync for MarineModuleConfig
impl Unpin for MarineModuleConfig
impl !UnwindSafe for MarineModuleConfig
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