Function mz_walkabout::load

source ·
pub fn load<P>(path: P) -> Result<Ir>
where P: AsRef<Path>,
Expand description

Loads type definitions from the specified module.

Returns an intermediate representation (IR) that can be fed to the generation functions, like gen_visit.

Note that parsing a Rust module is complicated. While most of the heavy lifting is performed by syn, syn does not understand the various options for laying out a crate—and there are many attributes and edition settings that control how modules can be laid out on the file system. This function does not attempt to be fully general and only handles the file layout currently required by Materialize.

Analyzing Rust types is also complicated. This function only handles basic Rust containers, like Option and Vec. It does, however, endeavor to produce understandable error messages when it encounters a type it does not know how to handle.