Struct capnpc::CompilerCommand
[−]
[src]
pub struct CompilerCommand { /* fields omitted */ }
A builder object for schema compiler commands.
Methods
impl CompilerCommand
[src]
fn new() -> CompilerCommand
Creates a new, empty command.
fn file<'a, P>(&'a mut self, path: P) -> &'a mut CompilerCommand where P: AsRef<Path>
Adds a file to be compiled.
fn src_prefix<'a, P>(&'a mut self, prefix: P) -> &'a mut CompilerCommand where P: AsRef<Path>
Adds a --src-prefix flag. For all files specified for compilation that start
with prefix
, removes the prefix when computing output filenames.
fn import_path<'a, P>(&'a mut self, dir: P) -> &'a mut CompilerCommand where P: AsRef<Path>
Adds an --import_path flag. Adds dir
to the list of directories searched
for absolute imports.
fn no_standard_import<'a>(&'a mut self) -> &'a mut CompilerCommand
Adds the --no-standard-import flag, indicating that the default import paths of /usr/include and /usr/local/include should not bet included.
fn run(&mut self) -> Result<()>
Runs the command.