[][src]Struct shared_memory::SharedMem

pub struct SharedMem { /* fields omitted */ }

Default shared mapping structure

Methods

impl SharedMem[src]

pub fn create(
    lock_type: LockType,
    size: usize
) -> Result<SharedMem, SharedMemError>
[src]

Creates a memory mapping with no link file of specified size controlled by a single lock.

pub fn open(unique_id: &str) -> Result<SharedMem, SharedMemError>[src]

pub fn create_linked<I: AsRef<OsStr>>(
    new_link_path: I,
    lock_type: LockType,
    size: usize
) -> Result<SharedMem, SharedMemError>
[src]

pub fn open_linked<I: AsRef<OsStr>>(
    existing_link_path: I
) -> Result<SharedMem, SharedMemError>
[src]

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

Returns the size of the SharedMem

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

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

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

Returns the link_path of the SharedMem

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

Returns the OS specific path of the shared memory object

Usualy on Linux, this will point to a file under /dev/shm/

On Windows, this returns a namespace

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

pub fn is_owner(&self) -> bool[src]

Trait Implementations

impl ReadLockable for SharedMem[src]

impl WriteLockable for SharedMem[src]

impl ReadRaw for SharedMem[src]

impl WriteRaw for SharedMem[src]

impl EventSet for SharedMem[src]

impl EventWait for SharedMem[src]

impl Drop for SharedMem[src]

fn drop(&mut self)[src]

Deletes the SharedMemConf artifacts

impl Display for SharedMem[src]

Auto Trait Implementations

impl !Send for SharedMem

impl Unpin for SharedMem

impl !Sync for SharedMem

impl !UnwindSafe for SharedMem

impl !RefUnwindSafe for SharedMem

Blanket Implementations

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

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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