Struct wasmedge_sdk::config::ConfigBuilder
source · pub struct ConfigBuilder { /* private fields */ }
Expand description
Defines a builder for creating a Config.
Implementations§
source§impl ConfigBuilder
impl ConfigBuilder
sourcepub fn new(options: CommonConfigOptions) -> Self
pub fn new(options: CommonConfigOptions) -> Self
Creates a new ConfigBuilder with the given CommonConfigOptions setting.
sourcepub fn with_statistics_config(self, options: StatisticsConfigOptions) -> Self
pub fn with_statistics_config(self, options: StatisticsConfigOptions) -> Self
Sets the StatisticsConfigOptions for the ConfigBuilder.
Argument
options
specifies the StatisticsConfigOptions settings to set.
sourcepub fn with_runtime_config(self, options: RuntimeConfigOptions) -> Self
pub fn with_runtime_config(self, options: RuntimeConfigOptions) -> Self
Sets the RuntimeConfigOptions for the ConfigBuilder.
Argument
options
specifies the RuntimeConfigOptions settings to set.
sourcepub fn with_compiler_config(self, options: CompilerConfigOptions) -> Self
Available on crate feature aot
only.
pub fn with_compiler_config(self, options: CompilerConfigOptions) -> Self
aot
only.Sets the CompilerConfigOptions for the ConfigBuilder.
Argument
options
specifies the CompilerConfigOptions settings to set.
sourcepub fn with_host_registration_config(
self,
options: HostRegistrationConfigOptions
) -> Self
pub fn with_host_registration_config( self, options: HostRegistrationConfigOptions ) -> Self
Sets the HostRegistrationConfigOptions for the ConfigBuilder.
Argument
options
specifies the HostRegistrationConfigOptions settings to set.
sourcepub fn build(self) -> WasmEdgeResult<Config>
pub fn build(self) -> WasmEdgeResult<Config>
Creates a new Config from the ConfigBuilder.
Errors
If fail to create a Config, then an error is returned.
Trait Implementations§
source§impl Debug for ConfigBuilder
impl Debug for ConfigBuilder
source§impl Default for ConfigBuilder
impl Default for ConfigBuilder
source§fn default() -> ConfigBuilder
fn default() -> ConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
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