Struct sc_executor_common::sandbox::Store [−][src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> 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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
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]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,