Enum wasmtime::InstanceAllocationStrategy[][src]

pub enum InstanceAllocationStrategy {
    OnDemand,
    Pooling {
        strategy: PoolingAllocationStrategy,
        module_limits: ModuleLimits,
        instance_limits: InstanceLimits,
    },
}

Represents the module instance allocation strategy to use.

Variants

OnDemand

The on-demand instance allocation strategy.

Resources related to a module instance are allocated at instantiation time and immediately deallocated when the Store referencing the instance is dropped.

This is the default allocation strategy for Wasmtime.

Pooling

The pooling instance allocation strategy.

A pool of resources is created in advance and module instantiation reuses resources from the pool. Resources are returned to the pool when the Store referencing the instance is dropped.

Fields of Pooling

strategy: PoolingAllocationStrategy

The allocation strategy to use.

module_limits: ModuleLimits

The module limits to use.

instance_limits: InstanceLimits

The instance limits to use.

Implementations

impl InstanceAllocationStrategy[src]

pub fn pooling() -> Self[src]

The default pooling instance allocation strategy.

Trait Implementations

impl Clone for InstanceAllocationStrategy[src]

impl Default for InstanceAllocationStrategy[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,