[−][src]Struct capnpc::CompilerCommand
A builder object for schema compiler commands.
Methods
impl CompilerCommand
[src]
pub fn new() -> CompilerCommand
[src]
Creates a new, empty command.
pub fn file<'a, P>(&'a mut self, path: P) -> &'a mut CompilerCommand where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Adds a file to be compiled.
pub fn src_prefix<'a, P>(&'a mut self, prefix: P) -> &'a mut CompilerCommand where
P: AsRef<Path>,
[src]
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.
pub fn import_path<'a, P>(&'a mut self, dir: P) -> &'a mut CompilerCommand where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Adds an --import_path flag. Adds dir
to the list of directories searched
for absolute imports.
pub fn no_standard_import<'a>(&'a mut self) -> &'a mut CompilerCommand
[src]
Adds the --no-standard-import flag, indicating that the default import paths of /usr/include and /usr/local/include should not bet included.
pub fn edition(&mut self, _rust_edition: RustEdition) -> &mut Self
[src]
Deprecated since 0.10.0:
no longer need to specify rust edition
Sets the Rust edition of the generated code.
pub fn output_path<'a, P>(&'a mut self, path: P) -> &'a mut CompilerCommand where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
Sets the output directory of generated code. Default is OUT_DIR
pub fn run(&mut self) -> Result<()>
[src]
Runs the command.
Auto Trait Implementations
impl Send for CompilerCommand
impl Sync for CompilerCommand
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,