pub struct ExecutionLimits {
pub memory_bytes: usize,
pub table_elements: usize,
pub instances: usize,
pub deadline_seconds: u64,
}Expand description
Fully-resolved execution limits for one session’s guests: the manifest’s
capabilities.limits block with every omitted field replaced by its DEFAULT_*.
Fields§
§memory_bytes: usizeCap on linear-memory growth, in bytes.
table_elements: usizeCap on table growth, in elements.
instances: usizeCap on instances a single store may create.
deadline_seconds: u64Wall-clock budget for a single guest invocation, in seconds.
Implementations§
Source§impl ExecutionLimits
impl ExecutionLimits
Sourcepub fn resolve(declared: Option<&ResourceLimits>) -> Self
pub fn resolve(declared: Option<&ResourceLimits>) -> Self
Resolve a manifest capabilities.limits block, substituting the default for each
field the manifest left out (and for the whole block when it is absent).
Trait Implementations§
Source§impl Clone for ExecutionLimits
impl Clone for ExecutionLimits
Source§fn clone(&self) -> ExecutionLimits
fn clone(&self) -> ExecutionLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExecutionLimits
Source§impl Debug for ExecutionLimits
impl Debug for ExecutionLimits
Source§impl Default for ExecutionLimits
impl Default for ExecutionLimits
impl Eq for ExecutionLimits
Source§impl PartialEq for ExecutionLimits
impl PartialEq for ExecutionLimits
impl StructuralPartialEq for ExecutionLimits
Auto Trait Implementations§
impl Freeze for ExecutionLimits
impl RefUnwindSafe for ExecutionLimits
impl Send for ExecutionLimits
impl Sync for ExecutionLimits
impl Unpin for ExecutionLimits
impl UnsafeUnpin for ExecutionLimits
impl UnwindSafe for ExecutionLimits
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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