Function parse_mediawiki_sql::utils::memory_map[][src]

pub unsafe fn memory_map(path: &Path) -> Result<Mmap, Error>
Expand description

Utility function for memory-mapping a SQL file to make it easier to use iterate_sql_insertions.

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.

Returns an Error::Io, which displays the action that failed as well as the path and the underlying std::io::Error.

Safety

Inherits unsafe annotation from Mmap::map.