Struct capnpc::CompilerCommand
source · pub struct CompilerCommand { /* private fields */ }
Expand description
A builder object for schema compiler commands.
Implementations
sourceimpl CompilerCommand
impl CompilerCommand
sourcepub fn new() -> CompilerCommand
pub fn new() -> CompilerCommand
Creates a new, empty command.
sourcepub fn file<'a, P>(&'a mut self, path: P) -> &'a mut CompilerCommandwhere
P: AsRef<Path>,
pub fn file<'a, P>(&'a mut self, path: P) -> &'a mut CompilerCommandwhere
P: AsRef<Path>,
Adds a file to be compiled.
sourcepub fn src_prefix<'a, P>(&'a mut self, prefix: P) -> &'a mut CompilerCommandwhere
P: AsRef<Path>,
pub fn src_prefix<'a, P>(&'a mut self, prefix: P) -> &'a mut CompilerCommandwhere
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.
sourcepub fn import_path<'a, P>(&'a mut self, dir: P) -> &'a mut CompilerCommandwhere
P: AsRef<Path>,
pub fn import_path<'a, P>(&'a mut self, dir: P) -> &'a mut CompilerCommandwhere
P: AsRef<Path>,
Adds an –import_path flag. Adds dir
to the list of directories searched
for absolute imports.
sourcepub fn no_standard_import<'a>(&'a mut self) -> &'a mut CompilerCommand
pub 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.
sourcepub fn edition(&mut self, rust_edition: RustEdition) -> &mut Self
pub fn edition(&mut self, rust_edition: RustEdition) -> &mut Self
Sets the Rust edition of the generated code.
Auto Trait Implementations
impl RefUnwindSafe for CompilerCommand
impl Send for CompilerCommand
impl Sync for CompilerCommand
impl Unpin for CompilerCommand
impl UnwindSafe for CompilerCommand
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more