Struct wasmcloud_runtime::runtime::RuntimeBuilder
source · pub struct RuntimeBuilder { /* private fields */ }
Expand description
RuntimeBuilder
used to configure and build a Runtime
Implementations§
source§impl RuntimeBuilder
impl RuntimeBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Returns a new RuntimeBuilder
sourcepub fn component_config(self, component_config: ComponentConfig) -> Self
pub fn component_config(self, component_config: ComponentConfig) -> Self
Set a custom ComponentConfig
to use for all component instances
sourcepub fn max_components(self, max_components: u32) -> Self
pub fn max_components(self, max_components: u32) -> Self
Sets the maximum number of components that can be run simultaneously. Defaults to 10000
sourcepub fn max_component_size(self, max_component_size: u64) -> Self
pub fn max_component_size(self, max_component_size: u64) -> Self
Sets the maximum size of a component instance, in bytes. Defaults to 50MB
sourcepub fn max_linear_memory(self, max_linear_memory: u64) -> Self
pub fn max_linear_memory(self, max_linear_memory: u64) -> Self
Sets the maximum amount of linear memory that can be used by all components. Defaults to 10MB
sourcepub fn max_execution_time(self, max_execution_time: Duration) -> Self
pub fn max_execution_time(self, max_execution_time: Duration) -> Self
Sets the maximum execution time of a component. Defaults to 10 minutes. This operates on second precision and value of 1 second is the minimum. Any value below 1 second will be interpreted as 1 second limit.
sourcepub fn force_pooling_allocator(self) -> Self
pub fn force_pooling_allocator(self) -> Self
Forces the use of the pooling allocator. This may cause the runtime to fail if there isn’t enough memory for the pooling allocator
Trait Implementations§
source§impl Clone for RuntimeBuilder
impl Clone for RuntimeBuilder
source§fn clone(&self) -> RuntimeBuilder
fn clone(&self) -> RuntimeBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for RuntimeBuilder
impl Default for RuntimeBuilder
source§fn default() -> RuntimeBuilder
fn default() -> RuntimeBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RuntimeBuilder
impl !RefUnwindSafe for RuntimeBuilder
impl Send for RuntimeBuilder
impl Sync for RuntimeBuilder
impl Unpin for RuntimeBuilder
impl !UnwindSafe for RuntimeBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 moresource§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more