Skip to main content

import

Function import 

Source
pub fn import(
    src: &str,
    files: impl FnMut(&str) -> Option<Vec<u8>>,
) -> Result<Imported, ImportError>
Expand description

Import a manuscript. The parser does no I/O: files returns the bytes of an image path as written in the manuscript (relative to it), or None if there is no such file. Each path is asked for once. Pass |_| None when no files are at hand; images then warn as missing.