pub struct ShMemBlock<'allocator, T>where
T: Sync + VirtualAddressSpaceIndependent,{ /* private fields */ }
Expand description
A smart pointer class that holds a Sync
and VirtualAddressSpaceIndependent
object.
The pointer is obtained by a call to a shared memory allocator’s alloc()
function (or the
global shalloc()
function. The memory is freed when the block is dropped.
This smart pointer is unique in that it may be serialized to a string, passed across process boundaries, and deserialized in a (potentially) separate process to obtain a view of the contained data.
Implementations§
source§impl<'allocator, T> ShMemBlock<'allocator, T>where
T: Sync + VirtualAddressSpaceIndependent,
impl<'allocator, T> ShMemBlock<'allocator, T>where
T: Sync + VirtualAddressSpaceIndependent,
pub fn serialize(&self) -> ShMemBlockSerialized
Trait Implementations§
source§impl<'allocator, T> Debug for ShMemBlock<'allocator, T>
impl<'allocator, T> Debug for ShMemBlock<'allocator, T>
source§impl<'allocator, T> Drop for ShMemBlock<'allocator, T>where
T: Sync + VirtualAddressSpaceIndependent,
impl<'allocator, T> Drop for ShMemBlock<'allocator, T>where
T: Sync + VirtualAddressSpaceIndependent,
source§impl<'allocator, T> Deref for ShMemBlock<'allocator, T>where
T: Sync + VirtualAddressSpaceIndependent,
impl<'allocator, T> Deref for ShMemBlock<'allocator, T>where
T: Sync + VirtualAddressSpaceIndependent,
impl<'allocator, T> Send for ShMemBlock<'allocator, T>
impl<'allocator, T> Sync for ShMemBlock<'allocator, T>where
T: Sync + VirtualAddressSpaceIndependent,
Auto Trait Implementations§
impl<'allocator, T> Freeze for ShMemBlock<'allocator, T>
impl<'allocator, T> RefUnwindSafe for ShMemBlock<'allocator, T>where
T: RefUnwindSafe,
impl<'allocator, T> Unpin for ShMemBlock<'allocator, T>
impl<'allocator, T> UnwindSafe for ShMemBlock<'allocator, T>where
T: RefUnwindSafe,
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