Struct vm_memory::atomic::GuestMemoryLoadGuard
source · [−]pub struct GuestMemoryLoadGuard<M: GuestMemory> { /* private fields */ }
Expand description
A guard that provides temporary access to a GuestMemoryAtomic
. This
object is returned from the memory()
method. It dereference to
a snapshot of the GuestMemory
, so it can be used transparently to
access memory.
Implementations
sourceimpl<M: GuestMemory> GuestMemoryLoadGuard<M>
impl<M: GuestMemory> GuestMemoryLoadGuard<M>
sourcepub fn into_inner(self) -> Arc<M>
pub fn into_inner(self) -> Arc<M>
Make a clone of the held pointer and returns it. This is more expensive than just using the snapshot, but it allows to hold on to the snapshot outside the scope of the guard. It also allows writers to proceed, so it is recommended if the reference must be held for a long time (including for caching purposes).
Trait Implementations
sourceimpl<M: GuestMemory> Clone for GuestMemoryLoadGuard<M>
impl<M: GuestMemory> Clone for GuestMemoryLoadGuard<M>
sourceimpl<M: Debug + GuestMemory> Debug for GuestMemoryLoadGuard<M>
impl<M: Debug + GuestMemory> Debug for GuestMemoryLoadGuard<M>
sourceimpl<M: GuestMemory> Deref for GuestMemoryLoadGuard<M>
impl<M: GuestMemory> Deref for GuestMemoryLoadGuard<M>
Auto Trait Implementations
impl<M> RefUnwindSafe for GuestMemoryLoadGuard<M> where
M: RefUnwindSafe,
impl<M> Send for GuestMemoryLoadGuard<M> where
M: Send + Sync,
impl<M> Sync for GuestMemoryLoadGuard<M> where
M: Send + Sync,
impl<M> Unpin for GuestMemoryLoadGuard<M>
impl<M> UnwindSafe for GuestMemoryLoadGuard<M> where
M: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, A> DynAccess<T> for A where
A: Access<T>,
<A as Access<T>>::Guard: 'static,
impl<T, A> DynAccess<T> for A where
A: Access<T>,
<A as Access<T>>::Guard: 'static,
sourcefn load(&self) -> DynGuard<T>
fn load(&self) -> DynGuard<T>
The equivalent of Access::load
.