pub struct MappedFile { /* private fields */ }Expand description
Read-only whole-file mapping with RAII lifetime.
Port provenance: oa::MappedFile.
Implementations§
Source§impl MappedFile
impl MappedFile
Sourcepub fn open_read_only(&mut self, path: &Path) -> Result<()>
pub fn open_read_only(&mut self, path: &Path) -> Result<()>
Open path for read-only access.
On supported platforms this performs a true OS-level memory mapping; elsewhere it reads the file into a heap buffer.
Port provenance: oa::MappedFile::openReadOnly.
Trait Implementations§
Auto Trait Implementations§
impl Forget for MappedFile
impl Freeze for MappedFile
impl Move for MappedFile
impl RefUnwindSafe for MappedFile
impl Send for MappedFile
impl Sync for MappedFile
impl Unpin for MappedFile
impl UnsafeUnpin for MappedFile
impl UnwindSafe for MappedFile
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