Struct wasmtime_runtime::StoreBox
source · pub struct StoreBox<T: ?Sized>(/* private fields */);
Expand description
A Box<T>
lookalike for memory that’s stored in a Store<T>
This is intended to be quite similar to a Box<T>
except without the
Deref
implementations. The main motivation for this type’s existence is to
appease the aliasing rules in miri to ensure that StoreBox
can be moved
around without invalidating pointers to the contents within the box. The
standard Box<T>
type does not implement this for example and moving that
will invalidate derived pointers.
Implementations§
Trait Implementations§
impl<T: Send + ?Sized> Send for StoreBox<T>
impl<T: Sync + ?Sized> Sync for StoreBox<T>
Auto Trait Implementations§
impl<T> Freeze for StoreBox<T>where
T: ?Sized,
impl<T> RefUnwindSafe for StoreBox<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Unpin for StoreBox<T>where
T: ?Sized,
impl<T> UnwindSafe for StoreBox<T>where
T: RefUnwindSafe + ?Sized,
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