Trait shared_memory::WriteLockable [−][src]
pub trait WriteLockable { fn wlock<D: SharedMemCast>(
&mut self,
lock_index: usize
) -> Result<WriteLockGuard<D>, Box<Error>>; fn wlock_as_slice<D: SharedMemCast>(
&mut self,
lock_index: usize
) -> Result<WriteLockGuardSlice<D>, Box<Error>>; }
Provides wlock/wlock_as_slice functionnalities
Required Methods
fn wlock<D: SharedMemCast>(
&mut self,
lock_index: usize
) -> Result<WriteLockGuard<D>, Box<Error>>
&mut self,
lock_index: usize
) -> Result<WriteLockGuard<D>, Box<Error>>
Returns a read/write lock to the shared memory
The caller must ensure that the index given to this function is valid
fn wlock_as_slice<D: SharedMemCast>(
&mut self,
lock_index: usize
) -> Result<WriteLockGuardSlice<D>, Box<Error>>
&mut self,
lock_index: usize
) -> Result<WriteLockGuardSlice<D>, Box<Error>>
Returns a read/write access to a &mut [T] on the shared memory
The caller must ensure that the index given to this function is valid
Implementors
impl<'a> WriteLockable for SharedMem<'a>