pub fn import(
reader: impl BufRead,
source: Source,
profile: Arc<dyn Profile>,
output: &Path,
cedex: Option<CedexTable>,
progress: impl FnMut(ImportProgress),
) -> Result<ImportStats, GeocoderError>Expand description
Index every document of reader and write the index to output.
The index is written to a temporary file next to output, then renamed:
a process opening output meanwhile sees the previous index, never a
partial one. Invalid lines are counted and skipped. cedex: stored with
the index, for the fr profile (see crate::postal).