pub struct VMLimits {Show 14 fields
pub max_memory_pages: u32,
pub max_stack_size: usize,
pub max_registers: u64,
pub max_register_size: Constrained<u64, MaxU64<{ _ }>>,
pub max_registers_capacity: u64,
pub max_logs: u64,
pub max_log_size: u64,
pub max_events: u64,
pub max_event_kind_size: u64,
pub max_event_data_size: u64,
pub max_storage_key_size: NonZeroU64,
pub max_storage_value_size: NonZeroU64,
pub max_blob_handles: u64,
pub max_blob_chunk_size: u64,
}Expand description
Defines the resource limits for a VM instance.
This struct is used to configure constraints on various VM operations to prevent excessive resource consumption.
Fields§
§max_memory_pages: u32The maximum number of memory pages allowed.
max_stack_size: usizeThe maximum stack size in bytes.
max_registers: u64The maximum number of registers that can be used.
max_register_size: Constrained<u64, MaxU64<{ _ }>>The maximum size of a single register’s data in bytes. constrained to be less than u64::MAX because register_len returns u64::MAX if the register is not found
max_registers_capacity: u64The total capacity across all registers in bytes.
max_logs: u64The maximum number of log entries that can be created.
max_log_size: u64The maximum size of a single log message in bytes.
max_events: u64The maximum number of events that can be emitted.
max_event_kind_size: u64The maximum size of an event’s “kind” string in bytes.
max_event_data_size: u64The maximum size of an event’s data payload in bytes.
max_storage_key_size: NonZeroU64The maximum size of a storage key in bytes.
max_storage_value_size: NonZeroU64The maximum size of a storage value in bytes.
max_blob_handles: u64The maximum number of blob handles that can exist.
max_blob_chunk_size: u64The maximum size of a single chunk when writing to or reading from a blob.
Trait Implementations§
impl Copy for VMLimits
Auto Trait Implementations§
impl Freeze for VMLimits
impl RefUnwindSafe for VMLimits
impl Send for VMLimits
impl Sync for VMLimits
impl Unpin for VMLimits
impl UnwindSafe for VMLimits
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Constraint for T
impl<T> Constraint for T
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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>
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>
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