Struct extism_manifest::MemoryOptions
source · pub struct MemoryOptions {
pub max_pages: Option<u32>,
pub max_http_response_bytes: Option<u64>,
pub max_var_bytes: Option<u64>,
}
Expand description
Configure memory settings
Fields§
§max_pages: Option<u32>
The max number of WebAssembly pages that should be allocated
max_http_response_bytes: Option<u64>
The maximum number of bytes allowed in an HTTP response
max_var_bytes: Option<u64>
The maximum number of bytes allowed to be used by plugin vars. Setting this to 0 will disable Extism vars. The default value is 1mb.
Implementations§
source§impl MemoryOptions
impl MemoryOptions
sourcepub fn with_max_pages(self, pages: u32) -> Self
pub fn with_max_pages(self, pages: u32) -> Self
Set max pages
sourcepub fn with_max_http_response_bytes(self, bytes: u64) -> Self
pub fn with_max_http_response_bytes(self, bytes: u64) -> Self
Set max HTTP response size
sourcepub fn with_max_var_bytes(self, bytes: u64) -> Self
pub fn with_max_var_bytes(self, bytes: u64) -> Self
Set max size of Extism vars
Trait Implementations§
source§impl Clone for MemoryOptions
impl Clone for MemoryOptions
source§fn clone(&self) -> MemoryOptions
fn clone(&self) -> MemoryOptions
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 Debug for MemoryOptions
impl Debug for MemoryOptions
source§impl Default for MemoryOptions
impl Default for MemoryOptions
source§fn default() -> MemoryOptions
fn default() -> MemoryOptions
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for MemoryOptions
impl<'de> Deserialize<'de> for MemoryOptions
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for MemoryOptions
impl PartialEq for MemoryOptions
source§fn eq(&self, other: &MemoryOptions) -> bool
fn eq(&self, other: &MemoryOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MemoryOptions
impl Serialize for MemoryOptions
impl StructuralPartialEq for MemoryOptions
Auto Trait Implementations§
impl Freeze for MemoryOptions
impl RefUnwindSafe for MemoryOptions
impl Send for MemoryOptions
impl Sync for MemoryOptions
impl Unpin for MemoryOptions
impl UnwindSafe for MemoryOptions
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