pub struct MmapSource { /* private fields */ }Expand description
Memory-mapped file source.
Implementations§
Source§impl MmapSource
impl MmapSource
Sourcepub unsafe fn open(path: &Path) -> Result<Self>
pub unsafe fn open(path: &Path) -> Result<Self>
Open a file-backed source by memory-mapping the whole file.
§Safety
The caller must guarantee that the mapped file is not mutated or truncated for the lifetime of the returned source. This includes writes through other file handles and writes from other processes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MmapSource
impl RefUnwindSafe for MmapSource
impl Send for MmapSource
impl Sync for MmapSource
impl Unpin for MmapSource
impl UnsafeUnpin for MmapSource
impl UnwindSafe for MmapSource
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more