[−][src]Struct shared_memory::SharedMem
Default shared mapping structure
Methods
impl SharedMem[src]
pub fn create(
lock_type: LockType,
size: usize
) -> Result<SharedMem, Box<dyn Error>>[src]
lock_type: LockType,
size: usize
) -> Result<SharedMem, Box<dyn Error>>
Creates a memory mapping with no link file of specified size controlled by a single lock.
pub fn open(unique_id: &str) -> Result<SharedMem, Box<dyn Error>>[src]
pub fn create_linked<I: AsRef<OsStr>>(
new_link_path: I,
lock_type: LockType,
size: usize
) -> Result<SharedMem, Box<dyn Error>>[src]
new_link_path: I,
lock_type: LockType,
size: usize
) -> Result<SharedMem, Box<dyn Error>>
pub fn open_linked<I: AsRef<OsStr>>(
existing_link_path: I
) -> Result<SharedMem, Box<dyn Error>>[src]
existing_link_path: I
) -> Result<SharedMem, Box<dyn Error>>
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]
pub fn get_link_path(&self) -> Option<&Path>[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]
Trait Implementations
impl ReadLockable for SharedMem[src]
fn rlock<D: SharedMemCast>(
&self,
lock_index: usize
) -> Result<ReadLockGuard<D>, Box<dyn Error>>[src]
&self,
lock_index: usize
) -> Result<ReadLockGuard<D>, Box<dyn Error>>
fn rlock_as_slice<D: SharedMemCast>(
&self,
lock_index: usize
) -> Result<ReadLockGuardSlice<D>, Box<dyn Error>>[src]
&self,
lock_index: usize
) -> Result<ReadLockGuardSlice<D>, Box<dyn Error>>
impl WriteLockable for SharedMem[src]
fn wlock<D: SharedMemCast>(
&mut self,
lock_index: usize
) -> Result<WriteLockGuard<D>, Box<dyn Error>>[src]
&mut self,
lock_index: usize
) -> Result<WriteLockGuard<D>, Box<dyn Error>>
fn wlock_as_slice<D: SharedMemCast>(
&mut self,
lock_index: usize
) -> Result<WriteLockGuardSlice<D>, Box<dyn Error>>[src]
&mut self,
lock_index: usize
) -> Result<WriteLockGuardSlice<D>, Box<dyn Error>>
impl ReadRaw for SharedMem[src]
unsafe fn get_raw<D: SharedMemCast>(&self) -> &D[src]
unsafe fn get_raw_slice<D: SharedMemCast>(&self) -> &[D][src]
impl WriteRaw for SharedMem[src]
unsafe fn get_raw_mut<D: SharedMemCast>(&mut self) -> &mut D[src]
unsafe fn get_raw_slice_mut<D: SharedMemCast>(&mut self) -> &mut [D][src]
impl EventSet for SharedMem[src]
impl EventWait for SharedMem[src]
impl Drop for SharedMem[src]
impl Display for SharedMem[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,