pub struct MemoryFile<'a, T> { /* private fields */ }
Implementations§
Source§impl<'a, T> MemoryFile<'a, T>where
T: Default,
impl<'a, T> MemoryFile<'a, T>where
T: Default,
Sourcepub unsafe fn new(name: &'a str) -> Result<Self, Box<dyn Error + Send + Sync>>
pub unsafe fn new(name: &'a str) -> Result<Self, Box<dyn Error + Send + Sync>>
§Safety
If the generic struct given does not match the memory layout, this is probably going to make shit hit the fan Do not use directly unless you know what you’re doing.
Sourcepub unsafe fn new_with_size(
name: &'a str,
size: usize,
) -> Result<Self, Box<dyn Error + Send + Sync>>
pub unsafe fn new_with_size( name: &'a str, size: usize, ) -> Result<Self, Box<dyn Error + Send + Sync>>
§Safety
If the generic struct given does not match the memory layout, this is probably going to make shit hit the fan Do not use directly unless you know what you’re doing.
Sourcepub unsafe fn new_with_offset_and_size(
name: &'a str,
offset: usize,
size: usize,
) -> Result<Self, Box<dyn Error + Send + Sync>>
pub unsafe fn new_with_offset_and_size( name: &'a str, offset: usize, size: usize, ) -> Result<Self, Box<dyn Error + Send + Sync>>
§Safety
If the generic struct given does not match the memory layout, this is probably going to make shit hit the fan Do not use directly unless you know what you’re doing.
pub fn read(&self) -> &T
Trait Implementations§
Source§impl<'a, T> Drop for MemoryFile<'a, T>
impl<'a, T> Drop for MemoryFile<'a, T>
impl<'a, T> Send for MemoryFile<'a, T>
impl<'a, T> Sync for MemoryFile<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for MemoryFile<'a, T>
impl<'a, T> RefUnwindSafe for MemoryFile<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Unpin for MemoryFile<'a, T>
impl<'a, T> UnwindSafe for MemoryFile<'a, T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more