Struct ResourcesRequired
pub struct ResourcesRequired {
pub num_memories: u32,
pub max_initial_memory_size: Option<u64>,
pub num_tables: u32,
pub max_initial_table_size: Option<u64>,
}
Expand description
A summary of the amount of resources required to instantiate a particular
Module
or Component
.
Example uses of this information:
-
Determining whether your pooling allocator configuration supports instantiating this module.
-
Deciding how many of which
Module
you want to instantiate within a fixed amount of resources, e.g. determining whether to create 5 instances of moduleX
or 10 instances of moduleY
.
Fields§
§num_memories: u32
The number of memories that are required.
max_initial_memory_size: Option<u64>
The maximum initial size required by any memory, in units of Wasm pages.
num_tables: u32
The number of tables that are required.
max_initial_table_size: Option<u64>
The maximum initial size required by any table.
Auto Trait Implementations§
impl Freeze for ResourcesRequired
impl RefUnwindSafe for ResourcesRequired
impl Send for ResourcesRequired
impl Sync for ResourcesRequired
impl Unpin for ResourcesRequired
impl UnwindSafe for ResourcesRequired
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> 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