pub unsafe fn memory_map<P: AsRef<Path>>(path: P) -> Result<Mmap, Error>
Available on crate feature utils only.
Expand description

Memory-maps a file, returning a useful message in case of error.

Pass a borrowed memory map to iterate_sql_insertions so that the schema struct produced by the iterator can borrow from the file’s contents. See the example in the crate documentation.

Errors

In case of error, returns an Error containing the action that failed, the path, and the underlying std::io::Error.

Safety

Inherits unsafe annotation from Mmap::map.