Struct sc_executor_common::sandbox::Store[][src]

pub struct Store<FR> { /* fields omitted */ }

This struct keeps track of all sandboxed components.

This is generic over a supervisor function reference type.

Implementations

impl<FR> Store<FR>[src]

pub fn new() -> Self[src]

Create a new empty sandbox store.

pub fn new_memory(&mut self, initial: u32, maximum: u32) -> Result<u32>[src]

Create a new memory instance and return it’s index.

Errors

Returns Err if the memory couldn’t be created. Typically happens if initial is more than maximum.

pub fn instance(&self, instance_idx: u32) -> Result<Rc<SandboxInstance<FR>>>[src]

Returns SandboxInstance by instance_idx.

Errors

Returns Err If instance_idx isn’t a valid index of an instance or instance is already torndown.

pub fn memory(&self, memory_idx: u32) -> Result<MemoryRef>[src]

Returns reference to a memory instance by memory_idx.

Errors

Returns Err If memory_idx isn’t a valid index of an memory or if memory has been torn down.

pub fn memory_teardown(&mut self, memory_idx: u32) -> Result<()>[src]

Tear down the memory at the specified index.

Errors

Returns Err if memory_idx isn’t a valid index of an memory or if it has been torn down.

pub fn instance_teardown(&mut self, instance_idx: u32) -> Result<()>[src]

Tear down the instance at the specified index.

Errors

Returns Err if instance_idx isn’t a valid index of an instance or if it has been torn down.

Auto Trait Implementations

impl<FR> !RefUnwindSafe for Store<FR>

impl<FR> !Send for Store<FR>

impl<FR> !Sync for Store<FR>

impl<FR> Unpin for Store<FR>

impl<FR> !UnwindSafe for Store<FR>

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> Instrument for T[src]

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

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

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<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]