pub struct LimiterConfig {
pub max_memory_bytes: usize,
pub max_table_elements: u32,
pub max_memories: u32,
pub max_tables: u32,
}Expand description
Configuration for the resource limiter.
Fields§
§max_memory_bytes: usizeMaximum memory in bytes.
max_table_elements: u32Maximum table elements.
max_memories: u32Maximum number of memory instances.
max_tables: u32Maximum number of tables.
Implementations§
Source§impl LimiterConfig
impl LimiterConfig
Sourcepub fn with_max_memory(self, bytes: usize) -> Self
pub fn with_max_memory(self, bytes: usize) -> Self
Set the maximum memory.
Sourcepub fn with_max_table_elements(self, elements: u32) -> Self
pub fn with_max_table_elements(self, elements: u32) -> Self
Set the maximum table elements.
Trait Implementations§
Source§impl Clone for LimiterConfig
impl Clone for LimiterConfig
Source§fn clone(&self) -> LimiterConfig
fn clone(&self) -> LimiterConfig
Returns a duplicate 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 Debug for LimiterConfig
impl Debug for LimiterConfig
Auto Trait Implementations§
impl Freeze for LimiterConfig
impl RefUnwindSafe for LimiterConfig
impl Send for LimiterConfig
impl Sync for LimiterConfig
impl Unpin for LimiterConfig
impl UnwindSafe for LimiterConfig
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§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