/// A mutable reference to the mapped backing file
///
/// # Note
/// Behaviour of faulted or unfaulted pages is not specified if the backing file is modified another way. Likewise, if the backing file is read from another way, the data mapped is not guaranteed to have been synced unless a `flush()` has completed. Be careful with this.
#[inline]
pubfninner_mut(&mutself)-> &mutT
{
&mutself.file
}
/// Unmap the memory contained in `T` and return it.
///
/// # Warning
/// If the map is shared, or refers to a persistent file on disk, you should call `flush()`
/// first or use `into_inner_synced()`
#[inline]
pubfninto_inner(self)-> T
{
drop(self.map);
self.file
}
}
impl<T: AsRawFd>MappedFile<T>{
impl<T: AsRawFd>MappedFile<T>{
/// Map the file `file` to `len` bytes with memory protection as provided by `perm`, and mapping flags provided by `flags`.
/// Map the file `file` to `len` bytes with memory protection as provided by `perm`, and mapping flags provided by `flags`.
/// # Mapping flags
/// # Mapping flags
@ -429,18 +459,6 @@ impl<T> MappedFile<T> {
},file)
},file)
}
}
/// Unmap the memory contained in `T` and return it.
///
/// # Warning
/// If the map is shared, or refers to a persistent file on disk, you should call `flush()`