[−][src]Struct sunrise_libuser::types::MappedSharedMemory
A mapping to a shared memory region.
When dropped, the memory region will be unmapped, and the SharedMemory handle associated with it will be closed.
Fields
handle: SharedMemory
addr: usize
size: usize
perm: MemoryPermissions
Implementations
impl MappedSharedMemory
[src]
pub fn as_ptr(&self) -> *const u8
[src]
Gets a raw pointer to the underlying shared memory.
The pointer is valid until the MappedSharedMemory instance gets dropped.
pub fn as_mut_ptr(&self) -> *mut u8
[src]
Gets a mutable raw pointer to the underlying shared memory.
The pointer is valid until the MappedSharedMemory instance gets dropped.
pub fn len(&self) -> usize
[src]
Gets the byte length of the mapped shared memory.
pub fn as_shared_mem(&self) -> &SharedMemory
[src]
Return a reference to the underlying shared memory. Useful to send a copy of the handle of an already mapped shared memory via IPC.
Trait Implementations
impl Debug for MappedSharedMemory
[src]
impl Drop for MappedSharedMemory
[src]
Auto Trait Implementations
impl RefUnwindSafe for MappedSharedMemory
impl Send for MappedSharedMemory
impl Sync for MappedSharedMemory
impl Unpin for MappedSharedMemory
impl UnwindSafe for MappedSharedMemory
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SizedIPCBuffer for T
[src]
fn size(&Self) -> usize
[src]
fn is_cool(usize, usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(usize, usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(usize, usize) -> &'a mut T
[src]
impl<T, U> TryFrom<U> 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<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,