Struct sc_executor::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]
impl<FR> Store<FR>[src]pub fn new() -> Store<FR>[src]
Create a new empty sandbox store.
pub fn new_memory(&mut self, initial: u32, maximum: u32) -> Result<u32, Error>[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>>, Error>[src]
&self,
instance_idx: u32
) -> Result<Rc<SandboxInstance<FR>>, Error>
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, Error>[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<(), Error>[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<(), Error>[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> CheckedConversion for T[src]
impl<T> CheckedConversion for T[src]pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>, [src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>, [src]
Self: TryInto<T>,
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>, [src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>, [src]impl<T> SaturatedConversion for T[src]
impl<T> SaturatedConversion for T[src]pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>, [src]
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>, [src]
Self: UniqueSaturatedInto<T>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>, [src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>, [src]pub fn unchecked_into(self) -> T[src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>, [src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>, [src]