[][src]Struct shared_memory::SharedMemRaw

pub struct SharedMemRaw { /* fields omitted */ }

Raw shared memory mapping

This feature is only useful when dealing with memory mappings not managed by this crate. When all processes involed use the shared_memory crate, it is highly recommended to avoid SharedMemRaw and use the much safer/full-featured SharedMem.

Methods

impl SharedMemRaw[src]

pub fn create(
    unique_id: &str,
    size: usize
) -> Result<SharedMemRaw, Box<dyn Error>>
[src]

Creates a raw mapping

pub fn open(unique_id: &str) -> Result<SharedMemRaw, Box<dyn Error>>[src]

Opens a raw mapping

pub fn get_size(&self) -> &usize[src]

Returns the size of the raw mapping

pub fn get_path(&self) -> &str[src]

Returns the OS specific path of the raw mapping

pub fn get_ptr(&self) -> *mut c_void[src]

Returns a void pointer to the first address of the mapping

Trait Implementations

impl ReadRaw for SharedMemRaw[src]

unsafe fn get_raw<D: SharedMemCast>(&self) -> &D[src]

Returns a read only reference to D casted onto the shared memory

unsafe fn get_raw_slice<D: SharedMemCast>(&self) -> &[D][src]

Returns a read only reference to a slice of D casted onto the shared memory

impl WriteRaw for SharedMemRaw[src]

unsafe fn get_raw_mut<D: SharedMemCast>(&mut self) -> &mut D[src]

Returns a mutable reference to D casted onto the shared memory

unsafe fn get_raw_slice_mut<D: SharedMemCast>(&mut self) -> &mut [D][src]

Returns a mutable reference to a slice of D casted onto the shared memory

Auto Trait Implementations

impl !Send for SharedMemRaw

impl !Sync for SharedMemRaw

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]