[−][src]Struct shared_memory::SharedMemRaw
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]
unique_id: &str,
size: usize
) -> Result<SharedMemRaw, Box<dyn Error>>
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]
U: From<T>,
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> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,